Communicates that a section or page has no content. A single size token
scales it from a small empty section up to a whole-page empty or 404 screen.
import { EmptyState } from '@oztix/roadie-components/empty-state'
The standalone md empty state has an IconTile, a message, and one action.
Use size='sm' for an empty state inside a card or panel.
Use size='lg' with a custom hero illustration for a full-page empty or 404
screen. Raise the heading to h1 with render.
The recommended pairing: sm → IconTile, md → SpotIllustration,
lg → hero illustration. The pairing is a convention, not enforced.
Set intent on the root to tint the IconTile and Button together. Omit it to
inherit the palette from an ancestor instead.
Title and description only.
Write the title, description, and actions with Interface copy.
Tickets you buy will appear here.
Do
Use size='sm' inside a card or panel, md for a standalone state, and
lg only for a whole-page empty or 404 screen.
Tickets you buy will appear here.
Don’t
Don't drop a whole-page lg state into a small section. It overwhelms the
surrounding UI.
Do
Pass intent on the root (or inherit it from an ancestor) so the tile and
buttons share one palette.
Don’t
Don't hard-code the same intent on every child. It drifts out of sync.
<Card><Card.Content><EmptyState size='sm'>…</EmptyState></Card.Content></Card>
Do
Wrap the empty state in a Card when you need a background or border.
EmptyState has no surface of its own.
<EmptyState className='rounded-xl border bg-raised p-6'>…</EmptyState>
Don’t
Don't bolt an ad-hoc surface onto the root with utility classes. Reach for
the Card you already have.
EmptyState.Title renders an <h2> by default. Use render={<h1 />} (or
another level) so the heading fits the surrounding document outline.
A whole-page state usually wants h1.alt='' on
<img> heroes. SpotIllustration sets aria-hidden automatically unless
you give it an aria-label. IconTile is not hidden by default. Add
aria-hidden to a purely decorative tile. The title and description carry
the meaning.Scales typography, spacing, and media together.
Palette for the empty state. Omit to inherit from an ancestor.
No additional props. It forwards all standard HTML attributes to the underlying element.
No additional props. It forwards all standard HTML attributes to the underlying element.
Defaults to circle.
No additional props. It forwards all standard HTML attributes to the underlying element.
Change the heading level, e.g. `render={<h1 />}`. Defaults to `<h2>`.