What to show when a table, list or search has nothing in it, with a way forward.
import { EmptyState } from "kivu-ui"On this page
import { EmptyState } from "kivu-ui";No invoices yet
Invoices you send will show up here, with their payment status.
import { Button, EmptyState } from "kivu-ui";
export default function Demo() {
return (
<EmptyState
className="w-full"
bordered
title="No invoices yet"
description="Invoices you send will show up here, with their payment status."
actions={
<>
<Button variant="outline">Import</Button>
<Button>New invoice</Button>
</>
}
/>
);
}Extends <div> attributes.
| Prop | Type | Default | Description |
|---|---|---|---|
title | ReactNode | - | Required. What's empty. |
description | ReactNode | - | Why, and what to do next. |
icon | ReactNode | null | - | Icon in a tile. null hides it. |
actions | ReactNode | - | Buttons. |
size | "sm" | "md" | "md" | Controls the size. |
bordered | boolean | false | Dashed border around the area. |
Every component also accepts className and forwards its ref. Root CSS class: .kivu-empty