<div class="cap-empty" data-kind="nothing-yet">
<div class="cap-empty-media" data-variant="icon" aria-hidden="true"><svg>...</svg></div>
<div class="cap-empty-header">
<p class="cap-empty-title">No sites are watched yet</p>
<p class="cap-empty-text">Add the first one and its checks start on the next pass.</p>
</div>
<div class="cap-empty-content"><button type="button" class="cap-btn" data-variant="primary">Add a site</button></div>
</div>
<div class="cap-empty" data-kind="no-match" data-flush>
<div class="cap-empty-header">
<p class="cap-empty-title">No jobs match “Blocked”</p>
<p class="cap-empty-text">14 jobs are hidden by this filter.</p>
</div>
<div class="cap-empty-content"><button type="button" class="cap-btn">Clear filter</button></div>
</div>
<div class="cap-empty" data-kind="all-clear">
<div class="cap-empty-header">
<p class="cap-empty-title"><span class="cap-status" data-tone="ok">[ok glyph]All clear</span></p>
<p class="cap-empty-text">No mentions are waiting.</p>
</div>
</div>
<div class="cap-empty" data-kind="failed" role="alert">
<div class="cap-empty-header">
<p class="cap-empty-title">[critical glyph]Could not load the queue</p>
<p class="cap-empty-text">The server answered with an error (502). Nothing changed on your side.</p>
</div>
<div class="cap-empty-content"><button type="button" class="cap-btn">Try again</button></div>
</div>
<div class="cap-empty-wait" aria-busy="true">
[spinner, labeled "Building the site"]
<p class="cap-empty-text">This usually takes about 30 seconds.</p>
</div>
Examples
No match
<div class="cap-empty" data-kind="no-match" id="sample-nomatch">
<div class="cap-empty-header">
<p class="cap-empty-title">No jobs match “Blocked”</p>
<p class="cap-empty-text">14 jobs are hidden by this filter.</p>
</div>
<div class="cap-empty-content">
<button type="button" class="cap-btn">Clear filter</button>
</div>
</div>
<div class="cap-specimen-row" id="e-missing">
<p>Last deploy: <span class="cap-missing">none</span></p>
<p>Owner: <span class="cap-missing" title="No one has claimed it">none<span class="cap-sr-only">: No one has claimed it</span></span></p>
</div>
API reference
Empty
Prop
Type
Required
Does
kind
EmptyKind
Yes
title
ReactNode
nothing-yet: "No sites are watched yet". no-match: "No jobs match “Blocked”". failed: "Could not load the queue". all-clear: defaults to "All clear".
children
ReactNode
One plain sentence: how to add the first, what the filter hides, what failed.
action
ReactNode
nothing-yet: the one way to add the first. no-match: Clear filter. failed: Try again.
icon
ReactNode
An icon in a muted tile above the title (an svg). Decorative: the title says it.
flush
boolean
No edge, for inside a panel or a table that already has one.
titleAs
"p" | "h1" | "h2" | "h3"
The title's element: a paragraph by default, a heading where the empty area is the page's subject (the error page's h1).
role
"status"
A polite status, for an empty area that replaces the page's content when nothing failed (the signed-out page). A failed one is always an alert.
Wait
Prop
Type
Required
Does
label
string
Yes
children
ReactNode
Yes
Over 10 seconds, say how long: "This usually takes about 30 seconds."
Missing
Prop
Type
Required
Does
children
ReactNode
The word for no value. Default "none".
reason
string
Why there is none, read out with the word (and shown on hover when it is text).
Parts and data attributes
Class
Is
.cap-empty
the root
.cap-empty-content
a part
.cap-empty-header
a part
.cap-empty-media
a part
.cap-empty-text
a part
.cap-empty-title
a part
.cap-empty-wait
a part
.cap-missing
its own class
Attribute
Values
data-flush
present or absent
data-kind
failed
data-variant
icon
Accessibility
Key
Does
Tab
Reaches the kind's action (Add, Clear filter, Try again); all clear has none
The title is --text, the line under it --muted, the failed title --crit: 4.5:1 in both themes.
failed is role="alert"; add it when the read fails so it is announced.
The icon tile is decorative (aria-hidden); the title carries the meaning.
Forced colors: the dashed edge and the icon tile take the system text color.