Base JS behaviour

Empty state

The friendly “nothing here yet” with a floating plate, a dashed orbit and primary/secondary actions — pure CSS.

Real scenarios

The component as it is used in a product — not a specimen grid.

The first-run page

The plate breathes, two sparks orbit it — pure CSS, resting under prefers-reduced-motion. Two doors out: loud and quiet.

No projects yet

A project holds one board, one inbox and its own members. Start from a blank page or let a sample do the talking.

The small one, inside a search

size="sm" fits inside a panel; typing a name that matches nothing lands here, and the ghost button clears the way back.

  • Landing rewrite
  • Gift cards
  • Onboarding v2

Important props

Important props
Prop Type Default What it does
title / description string بدون نتیجه Headline and copy; the title defaults to the package’s “no results”.
icon string folder The icon on the central plate.
action / actionHref string null Primary action; the quiet one via secondaryAction/secondaryHref.
actions slot — Your own action row instead of the ready buttons.
size string md sm inside panels, md and lg for pages.

Snippet

<x-nx::empty-state icon="folder" title="هنوز پروژه‌ای نیست"
    description="نخستین پروژهٔ خودتان را بسازید یا نمونه‌ها را ببینید."
    action="ساخت پروژه" action-href="/projects/new"
    secondary-action="مرور نمونه‌ها" secondary-href="/examples" />