nalarx-ui
Components

Empty state

The guiding "nothing here yet" block, and its failure twin.

bunx shadcn@latest add @nalarx/empty-state

Usage

Use it when a screen exists but the user has nothing in it yet. Say what is empty in one line, what they can do in one plain sentence, and offer the first step.

<EmptyState
  icon="bell"
  title="Nothing here yet"
  description="Create your first item to see it in this list."
  primaryAction={{ label: "Create", onClick: create }}
  secondaryAction={{ label: "Learn more", href: "/docs/alerts" }}
  linkComponent={Link}
/>

The panel form (fills its container), a framed list form, a compact one, and ErrorState:

Nothing here yet
Create your first item to see it in this list.
No members match
Try another name or clear the filter.
No results
Nothing here yet
Create your first item to see it in this list.
No members match
Try another name or clear the filter.
No results

Props

PropType
iconIconNameDefault inbox. The tile is always neutral.
titlestring
descriptionReactNode
primaryAction, secondaryAction{ label, onClick?, href? }Accent and default buttons; href renders a link.
actionReactNodeYour own action instead of primaryAction.
secondaryReactNodeA quieter line under the actions.
framedbooleanDashed sunken frame, for an empty list inside a section.
compactbooleanSmaller tile and title.
linkComponentElementTypeRenders href actions, e.g. Next.js Link.

ErrorState takes title, description, onRetry, retryLabel (default: the retry string) and compact; it is a role="alert" box.

Replaces

EmptyState.tsx (web), the Platform's base/EmptyState.tsx and NxEmptyState / NxErrorState.

On this page