EmptyView
A screen in the nav with nothing to show yet (the console's placeholder): an honest note, no fake preview. Also an empty state for a whole view. A labelled region, so a screen reader names it by its title.
import { EmptyView } from '@ergasti/bricks';Examples
Coming soon
The page for a screen that is not built yet: an icon, a tag, a title and one sentence.
Code
import { EmptyView } from '@ergasti/bricks';
function Soon() {
return <EmptyView title="Brand library" icon="file" tag="Coming soon">We’re still building this. We’ll let you know when it’s ready.</EmptyView>;
}With an action
Code
import { Button, EmptyView } from '@ergasti/bricks';
function WithAction() {
return <EmptyView title="No messages yet" icon="mail" tagTone="sky" tag="New" action={<Button variant="rasp">Write a message</Button>}>Messages you send to your creators show up here.</EmptyView>;
}Props
Prop
Type
Design guidance
How the BRICKS design system uses EmptyView. Written in docs/content/components/EmptyView.md; the props above are read from the code, which wins where the two disagree.
A whole-view placeholder: an icon, an optional tag pill, a title, one or two honest sentences and an optional action; use it for a nav destination with nothing to show yet ("Videos · Coming soon") or a view whose list is empty.
It is the console's placeholder screen carried into the shell: no fake preview, just what this is and what happens next. It is a labelled region, so screen readers name it by its title. For an empty list inside a card, use the block's own empty state (BlockState, DataTable empty) instead.
Anatomy
- Card (
.kit-shell-empty): 28px padding, radius--r-lg,--cardfill, 1px--line, column with gap 10, start-aligned. - Icon (
.kit-shell-empty-ic, optional): 40px sky square (radius 12) with a 20px glyph. - Tag (optional): a
PillintagTone("Coming soon"). - Title (
<h2>, display face 17px 700). - Text (
<p>,--ink-3, max 560px). - Action (
.kit-shell-empty-act, optional).
Variants
| Props | Look | Use when |
|---|---|---|
tag + icon | Sky icon, "Coming soon" pill | A screen not built yet (the "More" items). |
action, no tag | Title, sentence, button | An empty view with a next step ("No coupons yet" → Find creators). |
tagTone | Any PillTone (default 'sky') | "Paused" in warn, etc. |
States
Static. Long text wraps at 560px.
Usage
// A nav destination that is not built yet
<AppShell brand={brand} nav={nav} activeId="videos">
<EmptyView title="Videos" icon="log" tag="Coming soon">
We’re still building this. We’ll let you know when it’s ready.
</EmptyView>
</AppShell>// An empty view with a next step
<EmptyView title="No coupons yet" action={<Button variant="ink" onClick={() => navigate('/find')}>Find creators</Button>}>
Coupons appear here once a creator joins.
</EmptyView>Where it appears
- Library only: the console's placeholder screens (Videos, Messages, Fraud checks, Brand library in the gallery's "More" group;
AppShellstoryEmptyScreen). The v3 brand mock has no such screens. - Any brand or PR view with nothing yet. Not drawn as such in the v3 mocks.
Guidelines
Do
- Say plainly what will be here and when it appears.
- Offer one action when there is a real next step.
Don't
- Don't fake content or show a blurred preview.
- Don't use it inside a card list; use the block's empty state.
RTL and Arabic
- Content aligns right. Arabic: "الفيديوهات", "قريب", "الجزء ده لسه بنجهّزه. هنبلغك أول ما يبقى جاهز."
Tokens
--card, --line, --r-lg, --sky, --sky-ink (icon), --ink-3, --font-family-display; pill tone tokens.
Accessibility
<section aria-labelledby>its<h2>; the icon isaria-hidden.- Check the
h2fits the page outline (the page'sAppHeaderhas theh1).
Found in the source
- ARIA attributes set:
aria-labelledby,aria-hidden.
Read from the component's source and tests. See Accessibility for the patterns the library follows.
Related
BlockState/DataTableempty: empty lists inside cards.CalloutCard: a call to action on a page with content.ScreenErrorBoundary: when the view failed rather than being empty.
See also: Pill · Button · UsageMeter · useAppShell
Source
src/shell/EmptyView.tsx (line 24) on GitHub.