Data table: Empty
emptyMessage fills the body when there is no data or nothing matches the search.
| Method | Country | |||||
|---|---|---|---|---|---|---|
| No payments yet. | ||||||
0 of 0 rows selected
Page 1 of 1
This adds the example as components/examples/data-table/empty.tsx, together with the Data table component and the HextaUI theme tokens it needs.
pnpm dlx shadcn@latest add https://hextaui.com/r/data-table-empty.jsonTo add only the component, follow the Data table installation.
Props in this example
The Data table props this example sets, from the API reference.
| Prop | Type | Default |
|---|---|---|
tableThe table returned by useDataTable. | DataTableInstance<TData> | – |
| Prop | Type | Default |
|---|---|---|
emptyMessage | ReactNode | "No results." |
| Prop | Type | Default |
|---|---|---|
placeholder | string | "Search…" |
| Prop | Type | Default |
|---|---|---|
column | Column | – |
title | string | – |
| Prop | Type | Default |
|---|---|---|
table | Table | – |
| Prop | Type | Default |
|---|---|---|
row | Row | – |
Every prop is in the Data table API reference.
See them all, with keyboard support and accessibility notes, on the Data table page.
- ButtonButtons in every variant and size, with a built-in loading, success and error flow that skips the spinner for fast requests.
- CheckboxA checkbox whose check draws in, with indeterminate parents, groups and labels that share its hover.
- SkeletonPlaceholders that wait 150ms before showing, take the exact size of the content they wrap, and fade it in without moving anything.
- TableA responsive table with a surface style, wrapping or compact cells, sticky headers, pinned columns and scroll hints.
- AvatarUser photos with an initials fallback, status badges and stacked groups that collapse into a count.
- BadgeStatus labels with colored dots, removable tags that slide closed and counts that roll to their new value.