Skip to the page content

Empty states

What a page shows when there is nothing yet, and what to do next.

16 empty state types

Basic empty state

The template’s shared .basalt-empty, the one search boxes already show when nothing matches: an icon, a title and a line of text.

Basics

No customers in this group

Add customers from their profile page.

Show code
<div class="basalt-empty">
  <span class="basalt-empty-icon" aria-hidden="true"><i class="bi bi-people"></i></span>
  <p class="basalt-empty-title">No customers in this group</p>
  <p class="basalt-empty-text">Add customers from their profile page.</p>
</div>

Bootstrap utilities

Built from Bootstrap’s own utility classes only, for when no extra CSS is wanted. The colors still come from the palette.

Basics

No visits booked this week

The next one is on Tuesday, October 13.

Open the calendar
Show code
<div class="text-center px-3 py-5">
  <i class="bi bi-calendar-x fs-1 text-body-secondary" aria-hidden="true"></i>
  <h3 class="h6 mt-3 mb-1">No visits booked this week</h3>
  <p class="small text-body-secondary mb-3">The next one is on Tuesday, October 13.</p>
  <a class="btn btn-sm btn-outline-secondary" href="schedule.html">Open the calendar</a>
</div>

First use

Nothing has been made yet. A picture, a line on what goes here, and one clear way to start. The second button fills the space with samples, so the reader can look around first.

Illustrated

No products yet

Add the clothing and accessories you sell. Customers see them in the store as soon as you publish.

Add a product
Show code
<div class="basalt-empty basalt-empty-framed">
  <div class="basalt-empty-art"><svg class="basalt-illo basalt-illo-float" …></svg></div>
  <h3 class="basalt-empty-title">No products yet</h3>
  <p class="basalt-empty-text">Add the clothing and accessories you sell.</p>
  <div class="basalt-empty-actions">
    <a class="btn btn-sm btn-primary" href="products.html">Add a product</a>
    <button type="button" class="btn btn-sm btn-outline-secondary">Add three samples</button>
  </div>
</div>

All done

An empty queue can be good news. The check draws itself in when the panel scrolls into view, a few pieces of confetti settle, and then it stays still.

Illustrated

Every order is packed

Nothing left to ship on Friday. New orders will show up here as they come in.

Last one packed at 3:42 pm by Jacob Vance

Show code
<!-- data-basalt-empty-animate plays the check once, when it scrolls into view -->
<div class="basalt-empty basalt-empty-framed basalt-empty-success" data-basalt-empty-animate>
  <div class="basalt-empty-art"><svg class="basalt-illo basalt-illo-celebrate" …></svg></div>
  <h3 class="basalt-empty-title">Every order is packed</h3>
  <p class="basalt-empty-text">Nothing left to ship on Friday.</p>
  <p class="basalt-empty-hint">Last one packed at 3:42 pm by Jacob Vance</p>
</div>

No access

The reader reached something they can’t open. Say who can let them in, and let them ask from here. The button goes from sending to sent, and the request can be taken back.

Illustrated

Payroll is for admins only

Ask Sharon Oakley or another admin to let you in, or to share the report you need.

Show code
<div class="basalt-empty basalt-empty-framed basalt-empty-warning">
  <div class="basalt-empty-art">…</div>
  <h3 class="basalt-empty-title">Payroll is for admins only</h3>
  <p class="basalt-empty-text">Ask Sharon Oakley or another admin to let you in.</p>
  <div class="basalt-empty-actions">
    <button type="button" class="btn btn-sm btn-primary">Ask for access</button>
  </div>
</div>

Ghost preview

A faint outline of what will appear sits behind the message, so the reader can see what the space is for before it has anything in it.

Illustrated

No reviews yet

Reviews show up here after a customer’s first visit. You can ask for one now.

Show code
<div class="basalt-empty basalt-empty-framed basalt-empty-as-ghost">
  <div class="basalt-empty-ghost" aria-hidden="true">
    <span class="basalt-empty-ghost-row"><span></span><span class="w-62"></span><span></span></span>
    <!-- three or four rows -->
  </div>
  <div class="basalt-empty-ghost-msg">
    <h3 class="basalt-empty-title">No reviews yet</h3>
    <p class="basalt-empty-text">Reviews show up here after a customer’s first visit.</p>
  </div>
</div>

Inline

One line for small spaces, like a list group row or under a form label. A few words and an action, no picture.

Layout
Show code
<li class="list-group-item d-flex justify-content-between">
  <span>Tags</span>
  <span class="basalt-empty basalt-empty-inline">
    <span class="basalt-empty-text">No tags yet</span>
    <a class="basalt-empty-link" href="#">Add a tag</a>
  </span>
</li>

In a card

A compact version for a card body. The link opens a small form in place, and the first note takes the empty state’s place.

Layout

Notes on Misty Roach

No notes yet

Show code
<div class="card">
  <div class="card-header"><h3>Notes on Misty Roach</h3></div>
  <div class="card-body">
    <div class="basalt-empty basalt-empty-compact">
      <span class="basalt-empty-badge" aria-hidden="true"><i class="bi bi-sticky"></i></span>
      <h4 class="basalt-empty-title">No notes yet</h4>
      <button type="button" class="btn btn-sm btn-link">Add the first note</button>
    </div>
  </div>
</div>

Table row

Inside a Bootstrap table, one row spans every column. The header stays, so the reader still sees what would be listed there.

Layout
Invoice Customer Amount

No overdue invoices

Everyone has paid on time this month.

Show code
<table class="table">
  <thead>…</thead>
  <tbody>
    <tr class="basalt-empty-row"><td colspan="3">
      <div class="basalt-empty basalt-empty-compact basalt-empty-success">
        <span class="basalt-empty-badge" aria-hidden="true"><i class="bi bi-receipt"></i></span>
        <h3 class="basalt-empty-title">No overdue invoices</h3>
        <p class="basalt-empty-text">Everyone has paid on time this month.</p>
      </div>
    </td></tr>
  </tbody>
</table>

In a dropdown

A Bootstrap dropdown with nothing in it yet. One short line and a link to settings, instead of a blank menu.

Layout
Show code
<div class="dropdown">
  <button type="button" class="btn btn-outline-secondary dropdown-toggle"
          data-bs-toggle="dropdown" aria-expanded="false">Alerts</button>
  <div class="dropdown-menu">
    <div class="basalt-empty basalt-empty-compact basalt-empty-success">
      <span class="basalt-empty-badge" aria-hidden="true"><i class="bi bi-check2-all"></i></span>
      <p class="basalt-empty-title">You’re all caught up</p>
      <p class="basalt-empty-text">New visits and messages will land here.</p>
    </div>
    <div class="dropdown-divider"></div>
    <a class="dropdown-item" href="notifications.html">Alert settings</a>
  </div>
</div>

Split panel

Picture beside the words, for wide, short spaces such as a chart row on a dashboard. A progress bar says how long until there is something to show. It stacks on a phone.

Layout

Not enough sales to chart yet

Trends show up after two weeks of orders. You’re 5 days in.

5 of 14 days

Show code
<div class="basalt-empty basalt-empty-framed basalt-empty-split">
  <div class="basalt-empty-art basalt-empty-art-wide">…</div>
  <div class="basalt-empty-body">
    <h3 class="basalt-empty-title">Not enough sales to chart yet</h3>
    <p class="basalt-empty-text">Trends show up after two weeks of orders.</p>
    <div class="progress" role="progressbar" aria-label="Days of sales so far"
         aria-valuemin="0" aria-valuemax="14" aria-valuenow="5">
      <div class="progress-bar w-36"></div>
    </div>
    <div class="basalt-empty-actions">…</div>
  </div>
</div>

Error with retry

When loading fails, it tries again by itself after a countdown the reader can pause or skip. The first retry here fails too, so you can watch the count move on; the second one works.

Interactive

We couldn’t load your invoices

The billing service didn’t answer in time. Your invoices are safe; this page just couldn’t reach them.

Trying again in 8 seconds

Attempt 1 of 3 · Error 504

Show code
<div class="basalt-empty basalt-empty-framed basalt-empty-danger"
     data-basalt-retry data-basalt-retry-seconds="8">
  <div class="basalt-empty-art">…</div>
  <h3 class="basalt-empty-title">We couldn’t load your invoices</h3>
  <p class="basalt-empty-text">The billing service didn’t answer in time.</p>
  <div class="basalt-retry" data-basalt-retry-status>
    <svg class="basalt-mini-ring basalt-mini-ring-sm" viewBox="0 0 44 44" aria-hidden="true">
      <circle class="basalt-mini-ring-track" cx="22" cy="22" r="18"/>
      <path class="basalt-mini-ring-bar" d="M22 4a18 18 0 1 1 0 36a18 18 0 1 1 0-36" pathLength="100" data-basalt-retry-ring/>
    </svg>
    <span class="basalt-retry-text" data-basalt-retry-text>Trying again in 8 seconds</span>
  </div>
  <div class="basalt-empty-actions">
    <button type="button" class="btn btn-sm btn-primary" data-basalt-retry-now>Try now</button>
    <button type="button" class="btn btn-sm btn-outline-secondary"
            data-basalt-retry-pause aria-pressed="false">Pause</button>
  </div>
</div>

<script>
  // Your loader answers the retry: call e.detail.done(true) on success.
  panel.addEventListener('basalt:retry', (e) => load().then(() => e.detail.done(true), () => e.detail.done(false)));
</script>

Offline

Follows the browser’s real connection, and the switch fakes a dropped one. Anything done while offline is counted, and sent when the connection comes back.

Interactive

You’re offline

New visits will show up here once you’re back. What you change now is saved on this device.

Nothing waiting to send

Show code
<div data-basalt-offline>
  <!-- shown while offline -->
  <div class="basalt-empty basalt-empty-framed basalt-empty-muted" data-basalt-offline-show>
    <div class="basalt-empty-art">…</div>
    <h3 class="basalt-empty-title">You’re offline</h3>
    <p class="basalt-empty-text">New visits will show up here once you’re back.</p>
    <button type="button" class="btn btn-sm btn-outline-secondary" data-basalt-offline-check>Check again</button>
    <p class="basalt-empty-hint" aria-live="polite" data-basalt-offline-status></p>
  </div>
  <!-- shown while online -->
  <div data-basalt-offline-hide hidden>…</div>
</div>

No results

A search that comes up empty. The empty state repeats what was searched for, spots a likely typo, and offers the ways out: widen the filter or clear the words. It opens on a search with no hits so you can see it straight away.

Interactive
Show code
<div class="basalt-empty basalt-empty-framed">
  <div class="basalt-empty-art"><svg class="basalt-illo" …></svg></div>
  <h3 class="basalt-empty-title">No garment matches “pass”</h3>
  <p class="basalt-empty-text">
    Express Delivery Pass is in Extras.
    <!-- or: Did you mean <button class="basalt-empty-suggest">Blazer</button>? -->
  </p>
  <div class="basalt-empty-actions">
    <button type="button" class="btn btn-sm btn-primary">Search all categories</button>
    <button type="button" class="btn btn-sm btn-outline-secondary">Clear the search</button>
  </div>
  <p class="basalt-empty-hint">Popular: loafers, blazer</p>
</div>

<!-- Announce the result count in a live region next to the search box -->
<p id="search-count" aria-live="polite">No garment matches</p>

Drop zone

An empty list that is also the way to fill it. Drop a file anywhere on the panel or choose one, and the panel lights up while a file is held over it. The sample button runs the import without a file.

Interactive

No products imported yet

Drop your price list here, or choose the file. Columns are matched for you.

CSV or XLSX, up to 5 MB

Show code
<div class="basalt-empty basalt-empty-framed basalt-empty-drop" data-basalt-drop>
  <div class="basalt-empty-art">…</div>
  <h3 class="basalt-empty-title">No products imported yet</h3>
  <p class="basalt-empty-text">Drop your price list here, or choose the file.</p>
  <div class="basalt-empty-actions">
    <button type="button" class="btn btn-sm btn-primary" data-basalt-drop-browse>Choose a file</button>
  </div>
  <input type="file" class="visually-hidden" tabindex="-1" aria-hidden="true" data-basalt-drop-input>
  <p class="basalt-empty-overlay" aria-hidden="true">Drop to import</p>
</div>

<script>
  // Fired for a dropped or chosen file
  zone.addEventListener('basalt:files', (e) => upload(e.detail.files));
</script>

Setup checklist

A first-run page that is also a to-do list. Each step checks off in place, the ring fills, and the last one swaps the list for a finished state.

Interactive

Set up Fieldline

1 of 4 done

  1. Add your company detailsName, address and tax number Done
  2. Add a carerOne is enough to start booking visits
  3. Set your service windowsTwo hours, half a day, or your own
  4. Book your first visitThe customer gets an SMS with the arrival window
Show code
<div class="basalt-empty basalt-empty-framed basalt-empty-checklist" data-basalt-checklist>
  <div class="basalt-empty-steps-head">
    <svg class="basalt-mini-ring" viewBox="0 0 44 44" aria-hidden="true">
      <circle class="basalt-mini-ring-track" cx="22" cy="22" r="18"/>
      <path class="basalt-mini-ring-bar" d="M22 4a18 18 0 1 1 0 36a18 18 0 1 1 0-36" pathLength="100" data-basalt-checklist-ring/>
    </svg>
    <div>
      <h3 class="basalt-empty-title">Set up Fieldline</h3>
      <p class="basalt-empty-text" aria-live="polite" data-basalt-checklist-count>1 of 4 done</p>
    </div>
  </div>
  <ol class="basalt-empty-steps">
    <li class="basalt-empty-steps-item" data-basalt-checklist-item>
      <span class="basalt-empty-steps-mark" aria-hidden="true"><span>2</span><i class="bi bi-check-lg"></i></span>
      <span class="basalt-empty-steps-text">
        <span class="basalt-empty-steps-title">Add a carer</span>
        <span class="basalt-empty-steps-sub">One is enough to start booking visits</span>
      </span>
      <button type="button" class="btn btn-sm btn-outline-secondary" data-basalt-checklist-do>Add a carer</button>
    </li>
  </ol>
  <div class="basalt-empty-steps-finish" data-basalt-checklist-finish hidden>…</div>
</div>