Component libraryEmpty state
Empty state
ProEmpty collections, search results and errors with a clear next action.
npx shadcn@latest add @tidal-pro/empty-stateInstallation
Pro source is gated. Configure the @tidal-pro registry using the agent guide. Create an access key from your account after purchasing.
Terminal
Import components/ui/tidal.css, components/ui/empty-state.css, then add the component inside a tidal-scope wrapper. Its scoped design tokens keep it independent of your existing CSS.
Usage
Complete example source · Dependency and asset manifest
Loading the complete example…
API & behavior
Required visible title (ReactNode); optional description, actions and children for extra context. variant: empty(default), search or error controls decorative artwork and border treatment; consumers provide truthful corresponding text. headingLevel: h2, h3(default) or h4 should match the surrounding document. visual replaces the decorative folder art, or false removes it; custom visuals must be noninteractive because the visual slot is aria-hidden. Root forwards native div attributes/style/dir/className/ref. Optional announce(defaultfalse) places polite/status atomic semantics on the title/description only; actions and extra context remain outside this message. Static views stay silent. Consumers own data, loading, visibility, action effects and focus after replacing a view. No hidden state, timer, fetching, navigation or persistence is introduced. TidalEmptyStateAction forwards native button attributes/events/ref, defaults to type=button and supports explicit type=submit plus primary(default)/secondary variants. Native disabled remains native. For a real link use className='tidal-empty-action' and optional data-variant='secondary' to receive the same44px treatment; arbitrary custom action nodes are caller-styled. Guard handlers when using aria-disabled; that attribute alone does not block native activation. Long text wraps, actions stack in narrow containers, and original folder/icon geometry changes coordinate with the chosen variant. Scoped tidal.css/empty-state.css provide light/dark tokens, visible focus and finite entrance/variant motion, with static reduced-motion feedback. No sample project is created by the reusable component itself.
Style with the --t-* CSS variables. Set data-theme="dark" on your tidal-scope wrapper for a dark surface. Motion respects the system’s reduced-motion preference.