Data display
Placeholder
Empty state with icon, title, description and action.
import { Placeholder, PlaceholderContainer, PlaceholderIcon, PlaceholderTitle, PlaceholderDescription, PlaceholderActions } from "datui";Playground
Nothing here
Try a different filter.
<Placeholder title="Nothing here">Try a different filter.</Placeholder>Examples
Empty state
No messages
Conversations you start appear here.
Accessibility
titlerenders as anh2(change withtitleAs).- The icon is
aria-hidden.
API
Placeholder
Empty state: icon, title, description and an action.
| Prop | Type | Default | Description |
|---|---|---|---|
| action | ReactNode | — | Usually a `Button`. |
| className | string | — | |
| icon | ReactNode | — | |
| noPadding | boolean | — | Remove the outer padding. |
| stretched | boolean | — | Fill the available height and center the content vertically. |
| title | ReactNode | — | |
| titleAs | ElementType<any, keyof IntrinsicElements> | "h2" | Heading element for `title`. |
PlaceholderContainer
Centered column that holds the placeholder parts.
| Prop | Type | Default | Description |
|---|---|---|---|
| className | string | — | |
| noPadding | boolean | — | Remove the outer padding. |
| stretched | boolean | — | Fill the available height and center the content vertically. |
PlaceholderIcon
Large decorative icon.
| Prop | Type | Default | Description |
|---|---|---|---|
| className | string | — |
PlaceholderTitle
| Prop | Type | Default | Description |
|---|---|---|---|
| as | ElementType<any, keyof IntrinsicElements> | h2 | |
| className | string | — |
PlaceholderDescription
| Prop | Type | Default | Description |
|---|---|---|---|
| className | string | — |
PlaceholderActions
| Prop | Type | Default | Description |
|---|---|---|---|
| className | string | — |