Empty State
An Empty State fills a list, table or panel that has nothing in it yet, with a title, an explanation and the action that would change that. A blank area reads as a broken screen; an empty state reads as a screen waiting for its first item.
Rendered live, with the same build of the library you install.
No projects yet
EmptyState.tsx
import { NButton, NEmptyState } from '@nayan-ui/react';import { Inbox } from 'lucide-react';const EmptyState = () => {return (<div><NEmptyStateicon={<Inbox className="h-8 w-8" />}title="No projects yet"message="Create your first project and it will show up here."actions={<NButton>New project</NButton>}/></div>);};export default EmptyState;
| Name | Type | Default | Details |
|---|---|---|---|
| title | ReactNode | Required | The title prop. |
| message | ReactNode | Optional | The message prop. |
| icon | ReactNode | Optional | Shown above the title — an icon or a small illustration. |
| actions | ReactNode | Optional | Buttons or links under the message. |
| className | string | '' | The className prop. |
| iconClassName | string | '' | The iconClassName prop. |
| titleClassName | string | '' | The titleClassName prop. |
| messageClassName | string | '' | The messageClassName prop. |
| actionsClassName | string | '' | The actionsClassName prop. |
| children | ReactNode | Optional | The children prop. |
Other components solving nearby problems.