Layout primitives
All layout components accept shared sprinkles props such asp, 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.
- Preview
- Code
Stacks
YStack is a vertical flex container and XStack is a horizontal flex container.
- Preview
- Code
XGroup
UseXGroup for connected horizontal controls. Its children share borders and outer corner radii.
- Preview
- Code
Separator
Separator renders a horizontal rule by default. Set orientation="vertical" for an inline divider. Use decorative when it is purely visual.
- Preview
- Code