Billing address1200 Market Street, Philadelphia, PA 19107
A padded surface
import { Text } from "@senvenli/react/display";
import { Box, Stack } from "@senvenli/react/layout";
export default function Example() {
return (
<Box padding="space-300" background="surface-sunken" radius="large">
<Stack space="space-050">
<Text weight="medium">Billing address</Text>
<Text tone="subtle">1200 Market Street, Philadelphia, PA 19107</Text>
</Stack>
</Box>
);
}import { Box } from "@senvenli/react/layout";Examples
With a border
A divided region; `as` gives it the right element.Order notesLeave the parcel with the front desk.
import { Text } from "@senvenli/react/display";
import { Box, Stack } from "@senvenli/react/layout";
export default function Example() {
return (
<Box as="section" aria-label="Order notes" padding="space-200" radius="medium" border>
<Stack space="space-050">
<Text weight="medium">Order notes</Text>
<Text tone="subtle">Leave the parcel with the front desk.</Text>
</Stack>
</Box>
);
}Raised
A raised ground with its shadow, for content that floats above the page.Invoice INV-2041Due March 31, 2026
import { Text } from "@senvenli/react/display";
import { Box, Stack } from "@senvenli/react/layout";
export default function Example() {
return (
<Box paddingInline="space-300" paddingBlock="space-200" background="surface-raised" radius="large" shadow="raised">
<Stack space="space-050">
<Text weight="medium">Invoice INV-2041</Text>
<Text tone="subtle">Due March 31, 2026</Text>
</Stack>
</Box>
);
}Guidelines
When to use it
- Giving a group of content padding or a surface without a card's semantics.
Use something else when
- The content is one object with a title. Card
Accessibility
Built in
- Renders a plain element; pass
asfor semantics.
You provide
- The right element through
as(section, nav, aside…) when it has a role.
API reference
Box
| Prop | Type | Default | Description |
|---|---|---|---|
padding | Space | – | |
paddingInline | Space | – | |
paddingBlock | Space | – | |
background | Background | – | |
radius | Radius | – | |
shadow | Shadow | – | |
border | Border | – | |
as | LayoutElement | "div" |
paddingSpacepaddingInlineSpacepaddingBlockSpacebackgroundBackgroundradiusRadiusshadowShadowborderBorderasLayoutElementDefault"div"