Flex Layouts
Flex
Flexible box layout container for arranging items horizontally or vertically.direction?: 'row' | 'column'- Flex directionalign?: string- Align items (e.g., ‘center’, ‘flex-start’)justify?: string- Justify content (e.g., ‘space-between’, ‘center’)gap?: number- Spacing between itemswrap?: boolean- Allow items to wrap
FlexItem- Fixed-size flex itemFlexBlock- Flexible item that fills available space
HStack
Horizontal stack layout (flex row) with consistent spacing.spacing?: number- Space between items (default: 2)alignment?: 'top' | 'center' | 'bottom' | 'stretch'- Vertical alignmentjustify?: 'left' | 'center' | 'right' | 'space-between'- Horizontal distribution
VStack
Vertical stack layout (flex column) with consistent spacing.spacing?: number- Space between items (default: 2)alignment?: 'left' | 'center' | 'right' | 'stretch'- Horizontal alignment
Grid Layouts
Grid
CSS Grid layout container for two-dimensional layouts.columns?: number | string- Number of columns or templaterows?: number | string- Number of rows or templategap?: number- Gap between itemscolumnGap?: number- Horizontal gaprowGap?: number- Vertical gapalign?: string- Align itemsjustify?: string- Justify items
Spacing
Spacer
Flexible spacing component for creating gaps between elements.margin?: number | string- Margin valuemarginY?: number | string- Vertical marginmarginX?: number | string- Horizontal marginmarginTop?: number | stringmarginBottom?: number | stringpadding?: number | string- Padding value
Divider
Visual separator between content sections.margin?: number- Margin around dividermarginStart?: number- Start marginmarginEnd?: number- End margin
Card Components
Card
Flexible content container with elevation and borders.size?: 'small' | 'medium' | 'large'- Card sizeelevation?: number- Shadow depth (0-5)isBorderless?: boolean- Remove borderisRounded?: boolean- Rounded corners
CardHeader- Card header sectionCardBody- Main content areaCardFooter- Footer sectionCardMedia- Media content sectionCardDivider- Divider between sections
Panel Components
Panel
Expandable/collapsible sections container.header?: string- Panel header textclassName?: string- Additional CSS class
title?: string- Section titleicon?: IconType- Title iconinitialOpen?: boolean- Initially expanded (default: false)opened?: boolean- Controlled open stateonToggle?: (opened: boolean) => void- Toggle handler
- Simple wrapper for panel content with consistent spacing
Surface Components
Surface
Base surface component with elevation and borders.Elevation
Applies shadow/elevation effects to components.Structural Components
View
Polymorphic base component for custom layouts.Box
Utility component for spacing and layout control.Z-Index Management
ZStack
Stacks children along the z-axis.Responsive Utilities
VisuallyHidden
Hides content visually while keeping it accessible to screen readers.Container Queries
Many layout components support responsive props based on container size. Check individual component documentation in Storybook for container query support.Layout components are foundational primitives. Prefer using semantic layout components (HStack, VStack, Card) over generic containers (View, Box) for better code readability.