Box
A generic container for building layouts. Use as to render it as a different
tag, such as section or nav.
A Box holds content, like any container.
Usage
import { Box } from '@leverui/components';
<Box />
Examples
Render as another tag
as sets the HTML tag. Use it so a container carries meaning, such as a section with a heading, or a nav around links.
Shipping
This Box renders as a section element.
Text style
textStyle sets the font size and line height for everything inside.
Larger text for everything inside this Box.
Composition
A listing card built from Box, Image, Badge, and Text.

Top host
Modern home with a pool and garden, ten minutes from the beach
Props
| Prop | Default | Type | Description |
|---|---|---|---|
as | div | HTML tag name | The tag to render, such as section or nav. |
asChild | — | Solid render callback | Render your own element in place of the default. |
textStyle | — | string | A text style, such as sm or lg, for everything inside. |
Box also takes any attribute its tag accepts, such as id, class, or
onClick.
Style a Box with a CSS class. It has no props for colors or spacing.