docs / patterns / panel
Panel
the dashboard workhorse: it fills its grid cell, the header stays fixed, and the body scrolls its own overflow.
intensity · structuresrsc · server
provenance
shaped from sisu-pluslayer
core / patternsintensity
structures · organizes a region, stays out of the contentcomposition
a cell of DashboardGrid or a bento layout. it needs a sized boxbadge takes a Badge, actions take icon-only Buttonsnever nested in a Card or another Panel. it is the regionnot a page section on a marketing page. that is Card territorya11y
the loading spinner isrole="status" with an sr label · badge and actions keep their own semanticsjest-axedependencies
Spinner · Card from the same packagelive demo · try it out
overview
Deployments
live
- building
feat/docs
1ec3bbc · just now
- live
fix/hero-split
0df772e · 14m ago
- live
chore/tokens
c74cf7c · 1h ago
- live
feat/color-field
fa17ccd · 3h ago
- failed
fix/bento-grid
9d2d01e · 5h ago
- live
feat/segmented
8b21f04 · yesterday
- queued
chore/registry
a90c7d1 · yesterday
customize
eyebrowmono label above the title
titlethe panel heading
surfacehow it sits on the page
badgea status Badge in the header
loadingswaps the body for a Spinner
usage
import { Panel } from "@usva-ui/react/patterns/panel";
import { Badge } from "@usva-ui/react/primitives/badge";
<Panel
eyebrow="overview"
title="Deployments"
badge={<Badge tone="accent-alt" live>live</Badge>}
>
<DeploymentList />
</Panel>props
| prop | type | default | notes |
|---|---|---|---|
| title | ReactNode | — | the panel heading. |
| eyebrow | ReactNode | — | mono uppercase label above the title. |
| icon | ReactNode | — | leading icon, shown in a tile. |
| badge | ReactNode | — | right-aligned status slot. pass a Badge. |
| actions | ReactNode | — | right-aligned controls slot. icon-only Buttons fit. |
| loading | boolean | false | swaps the body for a centered Spinner. the header stays. |
| loadingSlot | ReactNode | — | replaces the default spinner while loading. a Skeleton stack goes here. |
| surface | CardSurface | "elevated" | how the panel sits on the page. shares Card's surface scale. |
get it
bun add @usva-ui/reactusage
import { Panel } from "@usva-ui/react/patterns/panel";
import { Badge } from "@usva-ui/react/primitives/badge";
<Panel eyebrow="overview" title="Deployments" badge={<Badge live>live</Badge>}>
<DeploymentList />
</Panel>