Skip to content

EmptyState

Stands in for content there is none of yet.

import { EmptyState } from '@/design-system';

Examples

No customers match these filters

Try a shorter search.
import { Button, EmptyState } from '@/design-system';

export default function EmptyStateBasic() {
  return (
    <EmptyState
      title="No customers match these filters"
      action={<Button variant="secondary">Clear filters</Button>}
    >
      Try a shorter search.
    </EmptyState>
  );
}

How it works

  • It has a dashed border. Say what will appear here, or how to bring results back.

Props

EmptyState takes only these props.

EmptyState props
PropTypeDefaultDescription
titlestringrequiredA level-two heading.
childrenReactNode—What happened and what to do.
actionReactNode—Usually one button.
classNamestring—Extra classes, for spacing or width. Utility classes override the component’s own styles.

Tokens

Tokens
TokenDefaultSets
--state-title-size1remTitle text size
--state-radius--radius-controlCorner radius
--state-padding3.5rem 1.5remPadding