Components / surfaces
Body
The content of a panel or a section: one block, or several set one distance apart.
Summary
The content of a panel or a section: one block, or several set one distance apart.
| APG pattern | none |
| Built on | native elements |
| Status | self-tested |
| Since | 0.16.0 |
<Card header={<Header title="Projects" count={3} />} footer={<Footer note="3 of 12" action={<Link href="/projects">All projects</Link>} />}>
<Body flush>
<DataTable columns={columns} rows={projects} />
</Body>
</Card>
Anatomy
A <div data-se="body"> and nothing inside it that the component names. The children are the caller's, top to bottom in the order written. It is one of the three regions of the panel template, with Header above it and Footer below; each stands alone, and a Card or a Dialog holds them in its slots.
_No named parts. The frame is the whole anatomy._
<div data-se="body" data-flush>
<table data-se="table">…</table>
</div>
data-se="body" names the anatomy and data-part="body" names a region of a panel. In a Card the two sit on different elements: the slot on the wrapper the card pads, the anatomy on the column inside it. The same holds for Header and Footer.
Properties
| Property | Values | Default | What it does |
|---|---|---|---|
flush | boolean | none | The content meets the edges of the panel that holds it: a Card drops the padding around its body, a Dialog the padding at its sides. For a table, a list of rows, a chart or media. Standing alone there is no padding to drop, and it changes nothing. |
children | React.ReactNode | required | The blocks, top to bottom in the order written, one space step apart. |
States
_None. Rest is the only condition it has._
Behavior
One distance between blocks. Every block sits --se-space-4 from the next, the step the conventions give siblings in one group. A block that wants its own parts closer together arranges them itself.
flush asks for the edge, and the panel answers. The attribute changes nothing on the body. A Card that holds a flush body drops the padding on all four sides of its body part, so a table under a header runs to the header's line and to the bottom of the frame. A Dialog drops the padding at its sides. Standing alone there is no padding to drop.
Accessibility
It is not a region and not a group. It carries no role and no name. A panel that needs a name takes it from its Header, or from the frame.
What it holds behaves as it does anywhere. A table in a flush body is the same table; its scroller, when it has one, is still the focus stop.
Keyboard
None of its own.
Roles, states and properties
_None written. The elements carry their own._
Focus
Never takes focus itself.
Screen reader
Not recorded as verified. Stage 4 of the readiness ladder — driving each component with VoiceOver and NVDA — is unstarted across the package, and no component should claim otherwise until docs/journal/ records the session that did it.
Contrast and target size
npm run check:contrast audits every color pair this component uses across all four skins, light and dark, and fails the build on a shortfall. Two waivers are on the record in docs/audit/DEFERRED.md.
It sets no target size of its own; anything interactive inside it brings its own.
Tested
test/apg/panel-regions.test.jsxtest/browser/panel-regions.spec.mjs
Known gaps
_No upstream requirement is recorded as not applicable._
Appearance
A column with one gap. No padding, no surface and no rule: the panel that holds it draws those, which is why the same body sits in a card, in a dialog and on the page unchanged. Each block fills the body's width, and min-inline-size: 0 keeps a wide block from pushing the panel.
| Token | Used for |
|---|---|
--se-space-4 | gap |
Motion
None.
Content
One subject for each body. Two subjects are two panels.
Usage
Between a Header and a Footer. In a Card's body, in a Dialog's body, or on the page with a layout primitive setting the distance between the three.
flush for content that pads itself. A DataTable, a chart, media. A table's cells pad themselves, so a padded panel around them pads twice. A Rows list is not flush: its rows have no inset, and sit inside the panel's padding under its Header.
When not to use it. For running text, Prose. For things side by side, the layout primitives. For a page's main region, PageShell. A Card with no Body in it still works: its body part pads and stacks what it is given, as it always did.
Notes
Its own component, the owner's word of 14 Nov 2026. Until then body was a part of Card and of Dialog only, and each wrote its own gap: 8 in a card, 16 in a dialog.
Padding of its own was rejected. A card pads --se-space-4 and a dialog --se-space-5. A body that padded itself would need to know which it was in, and 2.4 has the frame style the frame.
A choice of gaps was rejected. The spacing scale already says which step sits between siblings. A second gap is a block arranging its own parts.
Rows are not flush. The first drawing put a Rows list in a flush body, where a row's own inset sat 4 off the card's title. A plain row now has no inset and belongs inside the padding; docs/composition.md has the rule.
The name Content was rejected. content is already a part: the region a disclosure or a tab reveals.