Components
Section
Titled group on a settings page, with a header row for the title, a count, actions and a description.
import { List, Section } from "@openperf/deft";
<Section.Root>
<Section.Header>
<Section.Title>Email</Section.Title>
</Section.Header>
<List.Root>{rows}</List.Root>
</Section.Root>;When to use
| Need | Component |
|---|---|
| Titled group on a settings page or in a dialog body, with a description | Section |
| Titled piece of data on a detail page, such as a table | Block |
| Padded surface without a title | Panel |
Anatomy
<Section.Root>
{/* optional */}
<Section.Header>
<Section.Title />
<Section.Meta /> {/* short muted value, usually a count */}
<Section.Actions /> {/* pushed to the end of the row */}
<Section.Description /> {/* takes a full row: keep it last */}
</Section.Header>
<List.Root /> {/* or Panel.Root */}
</Section.Root>The header is a wrapping row at least 28px tall, inset 16px from the sides. The content below is not inset, so the List or Panel you put there spans the full width of the section.
API
No part declares props of its own; each one passes native HTML attributes to its element. Section.Title is a level-two heading.