Empty state

stable 1 kB
<hk-empty>

Three empty states that genuinely differ — nothing yet, nothing matching, and something broke — because the right next action is different in each.

#zero#placeholder

Live demo

Running in this page — interact with it.

Inputs

NameTypeDefaultDescription
iconstring''Icon class shown above the title.
titlestring''Headline.
bodystring''Supporting sentence — say what to do next.
actionLabelstring''Primary button label. Omit for no button.

Outputs

  • actionEventEmitter<void>

    Emits when the button is pressed.

Theming

Component tokens, each falling back to a global one:

PropertyDefaultControls
--hk-empty-icon#94a3b8Icon colour.
--hk-empty-pad2.5rem 1remBlock padding.

Accessibility

  • The title is a heading, so the state is reachable by heading navigation.
  • The action is a button when it triggers work and a link when it navigates — not always a button.

More in Feedback