Layout
Box
Generic layout element with padding, margin and size props on the spacing scale.
import { Box } from "datui";Examples
Layout props
Accessibility
- Renders a
divby default; useasfor semantic elements.
API
Box
Generic layout element with spacing and sizing props on datui's spacing scale.
| Prop | Type | Default | Description |
|---|---|---|---|
| alignSelf | AlignSelf | — | |
| as | ElementType<any, keyof IntrinsicElements> | — | |
| className | string | — | |
| display | "none" | "grid" | "inline" | "inline-block" | "block" | "contents" | "flex" | "inline-flex" | — | |
| flexBasis | Length | — | |
| flexGrow | number | — | |
| flexShrink | number | — | |
| height | Length | — | |
| margin | Space | — | |
| marginBlock | Space | — | |
| marginInline | Space | — | |
| maxHeight | Length | — | |
| maxWidth | Length | — | |
| minHeight | Length | — | |
| minWidth | Length | — | |
| padding | Space | — | |
| paddingBlock | Space | — | |
| paddingInline | Space | — | |
| position | Position | — | |
| width | Length | — |