Empty State

A table row for displaying a clear empty or filtered-results state.

Name Email Role
Maya Chen maya@example.com Designer
Aarav Patel aarav@example.com Engineer
Sofia Garcia sofia@example.com Manager

Installation

pnpm dlx shadcn-svelte@latest add http://sveltekit-prerender/r/data-table-empty.json

Usage

data-table.svelte

Examples

Basic

Name Email Role
No results found
There are no rows to display.

With an action

Name Status Team
No matching rows
Try clearing the current filters.

Custom icon

Invoice Customer Total
No rows in this view
This table view does not contain any matching rows.

Props

Data table empty props

NameTypeDefaultDescription
colspannumberrequiredNumber of visible table columns the empty row spans.
titlestring"No results found"Empty-state heading.
descriptionstring"There are no rows to display."Supporting empty-state text.
iconSnippetSearchXIconOptional icon snippet rendered above the title.
actionsSnippetundefinedOptional action content such as a clear-filters button.
classstringundefinedClasses applied to the empty-state container.