Components
Block
Compact title row with a count and actions above one piece of data on a detail page.
import { Block } from "@openperf/deft";
<Block.Root aria-label="Deploys">
<Block.Header>
<Block.Title>Deploys</Block.Title>
</Block.Header>
{children}
</Block.Root>;When to use
| Need | Component |
|---|---|
| One piece of data, such as a Data table, under a compact title on a detail page | Block |
| Settings group where a List or Panel follows a taller title with a description | Section |
Anatomy
<Block.Root>
{/* optional; wraps when it does not fit */}
<Block.Header>
<Block.Title /> {/* level-2 heading */}
<Block.Meta /> {/* muted value, such as a count */}
<Block.Actions /> {/* pushed to the end of the row */}
</Block.Header>
{/* content */}
</Block.Root>Block.Root is an unlabeled section, so pass aria-label to every block, including one without a header. The header has no side padding, so the title starts at the same edge as the content under it.
Actions
Block.Actions holds small controls: ghost buttons, a "View all" link or a "Show all" toggle for a long table. A Chart.Legend from Chart placed there before other controls gets 12px of space after it.
<Block.Header>
<Block.Title>Deploys</Block.Title>
<Block.Meta>3 deploys</Block.Meta>
<Block.Actions>
<Button.Root size="sm" variant="ghost">
Show all
</Button.Root>
</Block.Actions>
</Block.Header>API
No part declares props of its own.