<section class="cap-panel">
<header class="cap-panel-head">
<h2>Usage against free limits</h2>
<span class="cap-panel-src">Cloudflare. Read 6 minutes ago</span>
</header>
<div class="cap-panel-body">[content]</div>
</section>
<!-- holding a list or a table -->
<div class="cap-panel-body" data-flush>[a .cap-rows list or a .cap-table-wrap]</div>
<section class="cap-panel" aria-labelledby="queue-h">
<header class="cap-panel-head">
<h2 id="queue-h">Queue</h2>
<span class="cap-panel-action"><button type="button" class="cap-btn">Edit</button></span>
<p class="cap-panel-desc">Jobs wait here until a driver takes them.</p>
</header>
<div class="cap-panel-body" data-flush>
<div class="cap-panel-pad"><p>Two jobs are waiting.</p></div>
[a .cap-rows list or a .cap-table-wrap, edge to edge]
</div>
<footer class="cap-panel-foot">[buttons or a link]</footer>
</section>
Examples
With a count, a source and a link to the full view
<section class="cap-panel" id="p-more" data-section="Sites">
<header class="cap-panel-head">
<h3>Sites</h3>
<span class="cap-panel-count">6</span>
<span class="cap-panel-src">Watcher pass 40 seconds ago</span>
<span class="cap-panel-more"><a href="#sites">All columns in Sites</a></span>
</header>
<div class="cap-panel-body">
<p>Six sites, all up. The table is on the Sites view.</p>
</div>
</section>
Body only
<section class="cap-panel" id="p-body" aria-label="Release note">
<div class="cap-panel-body">
<p>Capsomer 0.1.0 shipped to the Capsid Portal on September 30. Nothing else uses it yet.</p>
</div>
</section>
The heading. A panel with no title and nothing else for its header is a bare surface: the body alone, no header band.
level
2 | 3
The heading level the page's outline needs: h2 under a page h1, h3 inside a section.
count
number
How many the panel holds, beside the heading: "12".
meta
ReactNode
A short line of figures beside the heading, for more than one count: "12 total · 3 active".
src
ReactNode
Where the data comes from and how fresh it is: "Cloudflare. Read 6 minutes ago".
more
ReactNode
A link to the full view, at the right of the header: "All columns in Sites".
moreHref
string
The same link from its address alone: moreLabel ("View all" by default) linking there.
moreLabel
string
reading
boolean
The panel's data is being read again: the source line shows "Reading again" with a spinner, and the panel is aria-busy, so what it shows reads as the old answer until the new one lands.
href
string
The whole panel is one link (a card leading somewhere): the panel is an <a>, so it may hold no other link or control.
description
ReactNode
shadcn's CardDescription: a muted line under the heading.
actions
ReactNode
Controls that belong to the whole panel, placed after the title.
footer
ReactNode
A tinted band under the body for the panel's own actions or a link (shadcn's CardFooter).
size
"sm"
"sm" tightens the panel's spacing (shadcn's Card size="sm").
headingId
string
The heading's id. Given, the panel is wired to its title with aria-labelledby, which makes the section a named region (a landmark): give it to the panels a person should be able to jump to, not to all eight on a page.
ref
Ref<HTMLElement>
The panel's <section>, for focus, scrolling or measuring.
flush
boolean
A list or a table that runs to the panel's edges: the body has no padding.
id
string
section
string
The name the anchor bar gives this panel. With an id, the bar links to the panel.
className
string
children
ReactNode
Yes
TablePanel
Prop
Type
Required
Does
title
ReactNode
Yes
headingId
string
Yes
The heading's id: the table's scrolling region is named by it.
isEmpty
boolean
Yes
Nothing to list: the panel shows empty (an Empty) in place of the table.
empty
ReactNode
Yes
reflow
boolean
Narrow screens stack each row into label and value pairs (the table's data-reflow).
caption
ReactNode
Yes
The table's caption, visually hidden: the heading names the region, the caption the table.
children
ReactNode
Yes
The table's thead and tbody; Table draws the region, the table and the caption.
actions
ReactNode
Controls that belong to the whole panel, placed after the title.
className
string
id
string
size
"sm"
"sm" tightens the panel's spacing (shadcn's Card size="sm").
meta
ReactNode
A short line of figures beside the heading, for more than one count: "12 total · 3 active".
src
ReactNode
Where the data comes from and how fresh it is: "Cloudflare. Read 6 minutes ago".
count
number
How many the panel holds, beside the heading: "12".
href
string
The whole panel is one link (a card leading somewhere): the panel is an <a>, so it may hold no other link or control.
ref
Ref<HTMLElement>
The panel's <section>, for focus, scrolling or measuring.
level
2 | 3
The heading level the page's outline needs: h2 under a page h1, h3 inside a section.
more
ReactNode
A link to the full view, at the right of the header: "All columns in Sites".
moreHref
string
The same link from its address alone: moreLabel ("View all" by default) linking there.
moreLabel
string
reading
boolean
The panel's data is being read again: the source line shows "Reading again" with a spinner, and the panel is aria-busy, so what it shows reads as the old answer until the new one lands.
description
ReactNode
shadcn's CardDescription: a muted line under the heading.
footer
ReactNode
A tinted band under the body for the panel's own actions or a link (shadcn's CardFooter).
section
string
The name the anchor bar gives this panel. With an id, the bar links to the panel.
Parts and data attributes
Class
Is
.cap-panel
the root
.cap-panel-action
a part
.cap-panel-body
a part
.cap-panel-count
a part
.cap-panel-desc
a part
.cap-panel-foot
a part
.cap-panel-head
a part
.cap-panel-more
a part
.cap-panel-pad
a part
.cap-panel-src
a part
Attribute
Values
data-flush
present or absent
data-size
sm
State
Read from
:active
the platform
:hover
the platform
Accessibility
Key
Does
None of its own
A panel holds other components; their keys apply
The heading is a real h2 or h3, so screen reader users move between panels by heading.
Forced colors: the header's tint is removed, so a rule under the header keeps it apart.