datui
Color scheme

Layout

Box

Generic layout element with padding, margin and size props on the spacing scale.

import { Box } from "datui";

Examples

Layout props

padding="l", maxWidth={360}, rendered as a section

Accessibility

  • Renders a div by default; use as for semantic elements.

API

Box

Generic layout element with spacing and sizing props on datui's spacing scale.

PropTypeDefaultDescription
alignSelfAlignSelf—
asElementType<any, keyof IntrinsicElements>—
classNamestring—
display"none" | "grid" | "inline" | "inline-block" | "block" | "contents" | "flex" | "inline-flex"—
flexBasisLength—
flexGrownumber—
flexShrinknumber—
heightLength—
marginSpace—
marginBlockSpace—
marginInlineSpace—
maxHeightLength—
maxWidthLength—
minHeightLength—
minWidthLength—
paddingSpace—
paddingBlockSpace—
paddingInlineSpace—
positionPosition—
widthLength—