Box API
View componentThe full prop reference for the Box component. A low-level layout primitive.
Import
tsx
import { Box } from '@structyl/styled';Props
Box
Low-level layout wrapper.
| Prop | Type | Default |
|---|---|---|
| display# | 'block' | 'inline' | 'inline-block' | 'flex' | 'inline-flex' | 'grid' | 'contents'Display utility applied to the root. | — |
| padding# | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 8Tokenized padding shortcut. | — |
| margin# | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 8Tokenized margin shortcut. | — |
| asChild# | booleanMerge props onto the immediate child instead of rendering the default element. | false |
| className# | stringAdditional Tailwind classes merged with the component defaults. | — |
Source code
If you didn't find what you need here, read the component implementation .