Skip to content

Empty state

Centered icon + title + copy + optional action for a list/table with no data yet.

View as Markdown

Preview

No jobs

No jobsCreate your first job to get started.
<div class="nx-empty">
  <span class="nx-empty__icon" aria-hidden="true">▤</span>
  <span class="nx-empty__title">No jobs</span>
  <span>Create your first job to get started.</span>
  <button class="nx-btn nx-btn--primary nx-btn--sm" type="button"
      style="margin-top:8px">Create job</button>
</div>

API

React props (NxKit)

React (NxKit) props
PropTypeDefaultRequiredDescription
titleReactNodeRequiredWhat is empty.
actionReactNodeRequiredThe next step. Required.
iconReactNodeundefinedDecorative, aria-hidden.

Classes

Framework-agnostic classes
ClassDescription
.nx-emptyCentered column, padded
.nx-empty__iconDecorative, aria-hidden
.nx-empty__titleInk, semibold

Accessibility

  • The icon is aria-hidden; the title + copy carry the meaning.
  • Always offer the next action (a button) rather than a dead end.

Do / Don’t

  • Do: Always pair the empty message with a primary next action.Don't ship an empty table/list cell with no guidance at all.

View in spec