Surface
A bordered region on the surface plane.
<Box plane="surface" border radius="surface" inset="default">
Bordered region on the surface plane
</Box>Places content on a chosen plane with optional borders, corners and inset spacing.
<Box plane="band" radius="control" inset="compact">
Recessed strip on the band plane
</Box>pnpm add @usefragments/uiThe npm package stays managed by your package manager. Import styles once from @usefragments/ui/styles. See the installation guide for framework and theme setup.
A bordered region on the surface plane.
<Box plane="surface" border radius="surface" inset="default">
Bordered region on the surface plane
</Box>A band tile inside a surface keeps its corners concentric.
import { Box } from '@usefragments/ui';
<Box plane="surface" border radius="surface" inset="compact">
<Box plane="band" radius="nested" inset="compact">
Inner tile at the nested corner
</Box>A single hairline on one logical side divides two strips.
<Box border="block-end" inset="compact">
Hairline below only
</Box>The four planes side by side.
import { Box } from '@usefragments/ui';
import { Stack } from '@usefragments/ui';
<Box plane="canvas" inset="default">
<Stack gap="sm">
<Box plane="band" radius="control" inset="compact">Band</Box>Prop | Type | Default | Description |
|---|---|---|---|
as | "div" | "article" | "aside" | "footer" | "header" | "main" | "nav" | "section" | "span" | undefineddivarticleasidefooterheadermainnavsectionspan | div | HTML element to render |
border | BoxBorder | undefined | Not set | The one hairline: true on every side, or a single logical block side. |
children | React.ReactNode | Not set | Content to render inside the box |
inset | BoxInset | undefineddefaultnonecompact | Not set | Inner inset from the surface inset recipe: compact (12) or default (16). |
plane | BoxPlane | undefinedcanvasbandsurfaceraised | Not set | The plane the box paints: canvas (page floor), band (recessed strip), surface (card plane) or raised (lifted plane). Omit for a transparent box. |
radius | BoxRadius | undefinednonenestedsurfacecontrol | Not set | Corner role. nested is the concentric corner for a box inset inside a surface. |
className | string | undefined | Not set | Additional class; use it for one-off sizing |