Last modified: 4/Oct/2024
Stack
The Stack component manages the layout of its immediate children along the vertical or horizontal axis, with optional spacing and dividers between each child.
#Usage
import { Stack } from '@kinsta/layout'
const MyComponent = () => {
return (
<Stack>
<Card.Frame header="Yavin IV"></Card.Frame>
<Card.Frame header="Kashyyyk"></Card.Frame>
<Card.Frame header="Endor"></Card.Frame>
</Stack>
)
}
#Props
#direction
FlexDirection
Sets the direction of the stack
#gap
0 | 25 | 50 | 100 | 150 | 200 | 250 | 300 | 400 | 500 | 600 | 700 | 1000 | 1300 | 1500 | 2000
Sets the gap between each item (space[gap])
#hasTopMargin
boolean
Adds a top margin to the stack with the size of the gap
#hasBottomMargin
boolean
Adds a bottom margin to the stack with the size of the gap
#hasLeftMargin
boolean
Adds a left margin to the stack with the size of the gap
#hasRightMargin
boolean
Adds a right margin to the stack with the size of the gap