Components/Feedback

EmptyState

Empty states explain why a place that would normally hold content is empty, and what the reader can do about it. They turn a blank region into an answer, whether the cause is a search that matched nothing, a feature not set up yet, or work that has finished and left nothing behind.

import { EmptyState } from '@growth-protocol-ai/alpha';

On this page

No containers yet

Containers hold the assets a workflow reads. Add one and it shows up here.

How to use containers
type
register
state
EmptyState.tsxtsx
1import { EmptyState } from '@growth-protocol-ai/alpha';
2
3<EmptyState
4 type="vacant"
5 register="calm"
6 filled={false}
7 droppable={false}
8 fill={false}
9 icon={<LayoutIcon />}
10 title="No containers yet"
11 description="Containers hold the assets a workflow reads. Add one and it shows up here."
12>
13 <Button emphasis="ghost">Add container</Button>
14 <EmptyStateHint href="#">How to use containers</EmptyStateHint>
15</EmptyState>

When to use

Reach for an empty state wherever a region can legitimately hold nothing — a list before its first entry, a search that matched nothing, an area waiting on a file. Say why it is empty, and where the reader can do something about it give them exactly one way to start. A blank region with no explanation reads as a screen that broke rather than one that is ready.

When not to use

Do not use one to report a failure: a request that did not come back is ErrorView’s, and it offers a retry where this offers a first step. Do not show one while the answer is still on its way either — that is Skeleton or Spinner, and an empty state during a load tells the reader there is nothing when there may yet be.

type4 values

The type is what the emptiness means. One of the four paints something of its own at the calm register these specimens use: placeholder’s border, which says an area is reserved rather than open. Confirmation moves the signal colour onto its title only in Expressive and only with no icon to put it on, which the register axis below is where to see. The other two are the same box, and what makes each read as itself is which optional parts you fill in: a glyph, a description, an action, a hint. Naming all four is still the point, because “no content yet” and “nothing went wrong, you are done” are opposite messages in identical boxes, and data-type is what tells the four apart — but note that ErrorView fixes it to placeholder, so pair it with :not([data-module="error-view"]) when a rule means coming-soon.

You are all set

Your analysis lands in your inbox shortly.

confirmation

No portfolios yet

A portfolio groups the trends you want to track together.

vacant

Drop a file to import

CSV or XLSX, and the first row is read as the header.

upload

Workflows will come here

Reusable processes that govern how a metric is monitored.

placeholder
typeWhen to use
confirmationThe operation finished and there is nothing left to do. It takes no action, because offering one undoes the message — the box is empty because the work is over.
vacantThe container is empty and the reader can fill it. The default, and the one type where the emptiness is a task rather than a report.
uploadAwaiting a file. Pair it with droppable where a drop handler is wired, and give the action the file input — the component draws the zone and never touches the file.
placeholderThe feature is not built yet. A solid border keeps the reserved area visible while it holds nothing, which is what separates an area someone is still building from one the reader is invited to fill.

register2 values

How loudly the box is allowed to say it, and it runs across every type. Calm is the default and the one to build in. Expressive moves the brand colour into whichever element is carrying the signal — and into exactly one of them, which is the discipline that keeps it from becoming decoration. The specimens below carry no action, because that part is yours to pass and is where the two registers are told apart by hand.

No containers yet

Containers hold the assets a workflow reads.

calm

No containers yet

Containers hold the assets a workflow reads.

expressive
registerWhen to use
calmThe default, and the baseline to get right first: a --text-typical glyph, --border-default edges and a --surface-depth-1 fill. The restraint almost every product surface wants.
expressiveThe brand layer. The glyph goes --button-primary, a filled box swaps its tonal fill for --aquarelle-graphics-blue, and a dashed or solid border promotes to match. A confirmation with no glyph puts the colour on its title instead, and gives it straight back the moment a glyph arrives.