Skip to main content

Function: Box()

Box(__namedParameters): Element

Defined in: components/Box/Box.tsx:202

The token-constrained escape hatch — a generic block container (D1 / ADR-009).

Entity = Structure. Reach for Box when you need a one-off padded, sized, or lightly-grouped region that is not a flex/grid layout (Stack/Grid) and not a depth-bearing card (Surface). Every prop accepts only a token keypadding="md", background="muted", radius="surface", maxWidth="reading" — so a layout can be composed expressively while no arbitrary hex/px value can enter the consumer. There is no style or className.

Parameters

ParameterType
__namedParametersBoxProps

Returns

Element

Example

// A centered, width-constrained reading column
<Stack align="center">
<Box maxWidth="reading" padding="lg">
<Text>Long-form content…</Text>
</Box>
</Stack>