Says what belongs here and offers one clear next action.
Default
Says what belongs here and offers one clear next action.
No projects yet
Projects hold the brief, files and feedback for one piece of client work.
Installation
Copies the component into src/design-system/ as your own source, with only the files it needs.
npx avesk-ui@latest add empty-stateBrings the 1 file it builds on (icon.tsx). The first time, it also adds the tokens and the cn() helper, imports the tokens in globals.css and installs clsx and tailwind-merge. Files already in your project are kept unless you add --force.
Import
Lives in src/design-system/components/empty-state.tsx.
import { EmptyState } from "@/design-system/components/empty-state";Usage
<EmptyState title="No projects yet" body="Projects keep your brief and scope together." actions={<Button variant="primary">Create project</Button>} />Examples
Two actions
A main action plus a quieter second one, e.g. importing instead of creating.
No clients yet
Add the companies you work with so you can send them proposals and invoices.
Small
size="sm" fits a small section, like Home's Needs your attention when nothing is waiting.
You're all caught up
Projects running late or over their effort budget will show up here.
Different icons
Pick the icon that matches what's missing: invoices, people, files.
No invoices
No designers
No files
Title only
Just a title for small panels where a sentence would be too much.
You're all caught up
When to use
Use it when
- A screen or section has no data yet (required on every screen)
Rules
- One primary action; an optional link as the second
- size md fills a page or table; size sm fits a small section
Properties
EmptyState
| Prop | Type | Default |
|---|---|---|
icon | IconName | "text-select" |
title * | string | – |
body | ReactNode | – |
actions | ReactNode | – |
size | "sm" | "md" | "md" |
* required
Accessibility
- Title is a heading
Related
Used in the Avesk app: Dashboard, Projects & Clients.