Search documentation

Search guides, examples, and component APIs.

Quick links
↑↓ NavigateEnter OpenEsc Close
Get started

Blocks / Data display

Empty states

Empty states shown inside a real Projects screen: first run with templates, no results with removable filters, no access with the workspace owner, and a failed load with a copyable reference.

bunx --bun @getweini/cli@latest add avatar button card copy-button empty-state link search-input
Customize
  • Choose the situation with `variant`: `first-run`, `no-results`, `no-access`, or `error`. Each has its own illustration, copy, and actions, but all share one layout so the product feels consistent.
  • Override any text through `copy[variant]`, for example `{ title, description, primary, secondary }`, and the page chrome through `copy.page`. The error variant also takes `detail`, a reference code people can copy and quote to support.
  • Each variant adds one specific next step: `templates` on first run (emits `template`), the searched `query` and removable `filters` on no results (emits `removeFilter`), the workspace `owner` on no access, and a status link on error (emits `status`).
  • The block emits `primary` and `secondary`; wire them to your create, clear-filters, or retry handlers. Pass `loading` while a retry runs so the primary action shows progress and cannot be pressed twice.
  • The illustrations and the dotted backdrop are inline SVG and CSS drawn with semantic tokens (`muted`, `border`, `primary`, `chart-*`, `destructive`), so they follow your theme in light and dark. Replace the `#art` slot with your own artwork.
  • The title is an `h2`; change the heading level to match the page. The illustration is hidden from assistive technology because the text carries the message.