structyl

The 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.

PropTypeDefault
display#'block' | 'inline' | 'inline-block' | 'flex' | 'inline-flex' | 'grid' | 'contents'

Display utility applied to the root.

padding#0 | 1 | 2 | 3 | 4 | 5 | 6 | 8

Tokenized padding shortcut.

margin#0 | 1 | 2 | 3 | 4 | 5 | 6 | 8

Tokenized margin shortcut.

asChild#boolean

Merge props onto the immediate child instead of rendering the default element.

false
className#string

Additional Tailwind classes merged with the component defaults.

Source code

If you didn't find what you need here, read the component implementation .

structyl — Accessible React Component Library