Stack
Stack is a container-type utility which abstracts layout implementation for its children components.
direction
refers to the stacking of children in either horizontal or vertical orientation.gap
refers to the space between children components.sm
,md
,lg
,xl
are responsive properties which can be used to supply custom direction & gap for respective breakpoints.
Responsive Stack
Examples
- Reduce viewport size below
md
to see the stack direction change. - Responsive Stack can be achieved using breakpoints in props of Stack.
- Provide
direction
&gap
for every breakpoint you want to use.
shrink
attribute onstack
makes container take height of its items in vertical stack.
- You can wrap any child with
StackItem
to provide customshrink
property to specific item.
- You can use
className
to provide align property to container to align all items
- You can wrap any child with
StackItem
& provide custom alignment usingclassName
on it.
shrink
attribute onstack
makes container take width of its items in horizontal stack.
- You can wrap any child with
StackItem
to provide customshrink
property to specific item.
- You can use
className
to provide align property to container to align all items
- You can wrap any child with
StackItem
& provide custom alignment usingclassName
on it.