Stack
Layout
@rockshin/tao-uiComposes children in a flex row or column with consistent spacing.
When to use
Use Stack for simple one-dimensional layout and spacing.
Recommended
- Prefer Stack over one-off margin rules for repeated spacing.
- Use semantic containers when the layout has richer meaning.
- Pass breakpoint maps (for example,
direction={{ xs: 'vertical', md: 'horizontal' }}) for responsive layouts.
Avoid
- Do not use the component outside its intended interaction model.
Examples
Basic usage
DesignEngineeringResearch
Direction, spacing, and alignment
Small gapCentered
Large gapEnd aligned
Responsive direction
Alignment
Use align and justifyContent on the root to position children.
Centered vertically
Wrapping items
Enable flexWrap on the semantic root so a long toolbar can wrap.
Responsive direction and gap
Use a vertical arrangement in narrow viewports and horizontal at wider breakpoints. Compare the phone preview.
Nested layouts
Let the outer stack space sections and the inner stack group related actions.
Workspace
Invite members and manage access.