Skip to main content

Layout primitives

All layout components accept shared sprinkles props such as p, gap, bg, borderRadius, width and alignItems.

Box

Box is the foundation primitive. It renders a div by default and supports as for a different element.

Stacks

YStack is a vertical flex container and XStack is a horizontal flex container.

XGroup

Use XGroup for connected horizontal controls. Its children share borders and outer corner radii.

Separator

Separator renders a horizontal rule by default. Set orientation="vertical" for an inline divider. Use decorative when it is purely visual.