Empty State
A centred message for a list or page with nothing to show.
No invoices yet
Create your first invoice and it will show up here.
import { InboxIcon } from "lucide-react"
import { Button } from "@dapplelight/signet-ui/components/button"
import { EmptyState } from "@dapplelight/signet-ui/components/empty-state"
export function Demo() {
return (
<EmptyState
icon={<InboxIcon className="size-8" />}
title="No invoices yet"
description="Create your first invoice and it will show up here."
action={<Button>New invoice</Button>}
/>
)
}Installation
npm i @dapplelight/signet-uiUsage
import { EmptyState } from "@dapplelight/signet-ui/components/empty-state"
<EmptyState title="No invoices yet" description="Create your first invoice." />Examples
Title only
No results
import { EmptyState } from "@dapplelight/signet-ui/components/empty-state"
export function Demo() {
return <EmptyState title="No results" />
}With description
Nothing matches your filters
Try a different status or widen the date range.
import { ReceiptIcon } from "lucide-react"
import { EmptyState } from "@dapplelight/signet-ui/components/empty-state"
export function Demo() {
return (
<EmptyState
icon={<ReceiptIcon className="size-8" />}
title="Nothing matches your filters"
description="Try a different status or widen the date range."
/>
)
}API Reference
EmptyState
Fills at least 60% of the viewport height, centred.
| Prop | Type | Default | Description |
|---|---|---|---|
title | string | required | The headline. |
description | string | none | Supporting text. |
icon | ReactNode | none | Shown above the title. |
action | ReactNode | none | Shown below, usually a Button. |