Empty State

The Empty State component provides a way to display an empty state with an optional icon, title, message, and action button.

Usage

Default

Nothing to Show

This section doesn't have any content yet.

<EmptyState title="Nothing to Show" message="This section doesn't have any content yet." />

Props

Data table
TypeDescription
actionAriaLabelstringOptional accessible label for the action button. Helpful when the visible action text is ambiguous.
actionLabelReactNodeOptional label for an action button.
aria-describedbystringOptional custom accessible description reference for the empty state region. If provided, overrides the generated message association.
aria-labelstringOptional custom accessible label for the entire empty state region. Useful when the title is visual but not sufficient as a landmark label.
aria-labelledbystringOptional custom accessible label reference for the entire empty state region. If provided, overrides the generated title association.
data-testidstringOptional test ID for testing frameworks.
iconIconTypeOptional icon component (e.g., from react-icons).
iconAriaLabelstringAccessible label for the icon when it is not decorative.
iconDecorativebooleanWhether the icon should be announced to assistive technology. Defaults to false.
idstringOptional ID for the root empty state container. Useful for external aria-labelledby / aria-describedby wiring.
messageReactNodeOptional supporting message below the title.
onActionClick(() => void)Optional click handler for the action button.
outlinebooleanWhether the component uses outline styles.
roleAriaRoleOptional role override. Defaults to "region" when a title exists, otherwise no role is applied.
roundingRoundingTypeControls the rounding of the component ('none' | 'small' | 'medium' | 'large' | 'full').
shadowShadowTypeControls the shadow of the component ('none' | 'light' | 'medium' | 'strong' | 'intense').
sizeSizeTypeSize modifier ('xs' | 'small' | 'medium' | 'large' | 'xl').
stateStateTypeThe EmptyState state ('success' | 'error' | 'warning' | 'disabled' | '').
themeThemeTypeTheming option for styling ('primary' | 'secondary' | 'tertiary' | 'quaternary' | 'clear').
titleReactNodeTitle text displayed prominently.