Rime

EmptyState

What an empty list means and what to do next: default, positive (all done) and filtered tones.

EmptyState never says just "No data". It names why the space is empty and offers the next step as an action. compact fits inside a Table.

Installation

npx shadcn@latest add KezLahd/rime/empty-state

Also installs: base, icon.

Usage

import { EmptyState } from "@/components/ui";

<EmptyState title="No projects yet" description="Create a project to start tracking work." action={<Button href="/projects/new">New project</Button>} />

Examples

Tones

No projects yet

Create a project to start tracking work.

All caught up

Nothing is waiting for review.

API

Generated from the component's TypeScript types and JSDoc (scripts/gen-ui-registry.mjs), so it always matches the source.

EmptyState

EmptyState props
PropTypeDefaultDescription
titleRequiredReactNode
descriptionRequiredReactNodeWhat to do next. Required: a bare "No data" is not an empty state.
actionReactNode
secondaryActionReactNode
iconReactNode
tone"default" | "positive" | "filtered""default"default = nothing here yet. positive = nothing needs you ("All caught up"), a green tile. filtered = the filters exclude everything; offer to clear them.
compactbooleanTighter spacing for inside tables and dropdowns.
classNamestring

Theme tokens

Per-component tokens are undeclared by default, so the default shown is the fallback the CSS uses. Set one at :root (or in theme.css) to restyle every instance. Live values are read from this page, so they follow the Rime Studio.

This component has no tokens of its own; it reads the system tokens below.

System tokens it reads

EmptyState system tokens
TokenDefaultLive value
--brand-gradient-softtokens.css…
--ink-brandtokens.css…
--ink-headingtokens.css…
--ink-mutedtokens.css…
--line-brandtokens.css…
--neutral-filltokens.css…
--neutral-linetokens.css…
--r-mdtokens.css…
--success-filltokens.css…
--success-inktokens.css…
--success-linetokens.css…
--text-bodytokens.css…
--text-captiontokens.css…
--text-smalltokens.css…

Accessibility

  • The icon is decorative; the title and description are plain text, so put the empty state under the heading of the list it belongs to.

Do and don't

Do

  • Use tone="filtered" with a clear-filters action when filters emptied the list.

Don't

  • Never ship a bare "No data".

For AI agents

This page as markdown, rendered from the same registry entry. Point an agent at it (or add .md to this page's URL), or at /llms.txt for the index.

Open empty-state.md