datui
Color scheme

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

  • title renders as an h2 (change with titleAs).
  • The icon is aria-hidden.

API

Placeholder

Empty state: icon, title, description and an action.

PropTypeDefaultDescription
actionReactNode—Usually a `Button`.
classNamestring—
iconReactNode—
noPaddingboolean—Remove the outer padding.
stretchedboolean—Fill the available height and center the content vertically.
titleReactNode—
titleAsElementType<any, keyof IntrinsicElements>"h2"Heading element for `title`.

PlaceholderContainer

Centered column that holds the placeholder parts.

PropTypeDefaultDescription
classNamestring—
noPaddingboolean—Remove the outer padding.
stretchedboolean—Fill the available height and center the content vertically.

PlaceholderIcon

Large decorative icon.

PropTypeDefaultDescription
classNamestring—

PlaceholderTitle

PropTypeDefaultDescription
asElementType<any, keyof IntrinsicElements>h2
classNamestring—

PlaceholderDescription

PropTypeDefaultDescription
classNamestring—

PlaceholderActions

PropTypeDefaultDescription
classNamestring—