Book a callGitHub147

No invoices match these filters

Your filters hide all 46 invoices. Remove one, or clear them all.

  • Status: Overdue
  • Owner: Me
  • Over $10,000

Live preview: try it.

Source
<!-- Icons: Lucide (lucide.dev), ISC licence -->
<style>
.odl-empty-filtered { box-sizing: border-box; inline-size: 100%; max-inline-size: 40rem; margin-inline: auto; container-type: inline-size; font: var(--ds-text-body-md); color: var(--ds-color-text-primary); text-wrap: pretty; }
.odl-empty-filtered *, .odl-empty-filtered *::before, .odl-empty-filtered *::after { box-sizing: border-box; }
.odl-empty-filtered svg { flex: none; inline-size: var(--ds-size-icon-sm); block-size: var(--ds-size-icon-sm); fill: none; stroke: currentColor; stroke-width: var(--ds-icon-stroke-md); }
.odl-empty-filtered h2, .odl-empty-filtered h3, .odl-empty-filtered p, .odl-empty-filtered ul, .odl-empty-filtered ol, .odl-empty-filtered dl, .odl-empty-filtered dd { margin: 0; }
.odl-empty-filtered h2, .odl-empty-filtered h3 { text-wrap: balance; }
.odl-empty-filtered .odl-btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--ds-space-inline-sm); min-block-size: max(var(--ds-size-control-md), var(--ds-size-target-min)); padding: 0 var(--ds-space-inset-md);
  border: var(--ds-border-width-default) solid transparent; border-radius: var(--ds-radius-control); background: var(--ds-color-bg-action-primary); color: var(--ds-color-text-on-action);
  font: var(--ds-text-label-lg); font-weight: var(--ds-font-weight-label); text-decoration: none; white-space: nowrap; cursor: pointer; transition: background-color var(--ds-motion-duration-short) var(--ds-motion-easing-standard); }
.odl-empty-filtered .odl-btn:hover { background: var(--ds-color-bg-action-primary-hover); }
.odl-empty-filtered .odl-btn:active { background: var(--ds-color-bg-action-primary-pressed); }
.odl-empty-filtered .odl-btn.is-quiet { border-color: var(--ds-color-border-default); background: var(--ds-color-surface-raised); color: var(--ds-color-text-primary); }
.odl-empty-filtered .odl-btn.is-quiet:hover { background: var(--ds-color-bg-neutral-subtle); }
.odl-empty-filtered .odl-btn.is-text { padding-inline: var(--ds-space-inset-sm); background: transparent; color: var(--ds-color-text-link); }
.odl-empty-filtered .odl-btn.is-text:hover { background: var(--ds-color-bg-neutral-subtle); }
.odl-empty-filtered .odl-btn[disabled], .odl-empty-filtered .odl-btn[aria-disabled="true"] { opacity: var(--ds-opacity-disabled-container); cursor: not-allowed; }
.odl-empty-filtered button:focus-visible, .odl-empty-filtered a:focus-visible, .odl-empty-filtered input:focus-visible, .odl-empty-filtered textarea:focus-visible, .odl-empty-filtered [tabindex]:focus-visible { outline: var(--ds-focus-ring-width) solid var(--ds-color-border-focus); outline-offset: var(--ds-focus-ring-offset); }
.odl-empty-filtered .odl-sr { position: absolute; inline-size: 1px; block-size: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.odl-empty-filtered { display: grid; justify-items: center; padding: var(--ds-space-section-sm) var(--ds-space-inset-xl); text-align: center;
  border: var(--ds-border-width-default) solid var(--ds-color-border-subtle); border-radius: var(--ds-radius-container); background: var(--ds-color-surface-raised); }
.odl-empty-filtered .odl-art { display: grid; place-items: center; inline-size: calc(var(--ds-size-control-lg) * 1.25); aspect-ratio: 1; margin-block-end: var(--ds-state-empty-gap, var(--ds-space-stack-md));
  border-radius: var(--ds-radius-full); background: var(--ds-color-surface-sunken); color: var(--ds-color-icon-default); }
.odl-empty-filtered .odl-art svg { inline-size: var(--ds-state-empty-media, var(--ds-size-icon-lg)); block-size: var(--ds-state-empty-media, var(--ds-size-icon-lg)); stroke-width: var(--ds-icon-stroke-sm); }
.odl-empty-filtered h2 { font: var(--ds-text-title-md); font-weight: var(--ds-font-weight-heading); }
.odl-empty-filtered .odl-lead { max-inline-size: var(--ds-state-empty-measure, var(--ds-layout-measure-lead)); margin-block-start: var(--ds-space-stack-sm); color: var(--ds-color-text-secondary); }
.odl-empty-filtered .odl-acts { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--ds-space-inline-sm); margin-block-start: var(--ds-space-stack-xl); }
@container (max-width: 26rem) {
  .odl-empty-filtered { padding: var(--ds-space-section-sm) var(--ds-space-inset-lg); }
  .odl-empty-filtered .odl-acts { flex-direction: column; align-self: stretch; }
}

.odl-empty-filtered .odl-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--ds-space-inline-sm); margin-block-start: var(--ds-space-stack-lg); padding: 0; list-style: none; }
.odl-empty-filtered .odl-chips li { display: inline-flex; align-items: center; gap: var(--ds-space-inline-xs); padding-inline-start: var(--ds-space-inset-sm);
  border: var(--ds-border-width-default) solid var(--ds-color-border-default); border-radius: var(--ds-radius-full); background: var(--ds-color-surface-raised); font: var(--ds-text-label-md); }
.odl-empty-filtered .odl-chips button { display: grid; place-items: center; inline-size: var(--ds-size-target-min); block-size: var(--ds-size-target-min); padding: 0; border: 0; border-radius: var(--ds-radius-full); background: transparent; color: var(--ds-color-icon-subtle); cursor: pointer; }
.odl-empty-filtered .odl-chips button:hover { background: var(--ds-color-bg-neutral-subtle); color: var(--ds-color-text-primary); }
.odl-empty-filtered .odl-live { margin-block-start: var(--ds-space-stack-sm); color: var(--ds-color-text-secondary); font: var(--ds-text-body-sm); }
.odl-empty-filtered .odl-live:empty { margin: 0; }
@media (prefers-reduced-motion: reduce) { .odl-empty-filtered, .odl-empty-filtered *, .odl-empty-filtered *::before, .odl-empty-filtered *::after { transition: none !important; animation: none !important; } }
</style>
<section class="odl-empty-filtered" aria-label="Invoices">
  <span class="odl-art" aria-hidden="true"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M13.013 3H2l8 9.46V19l4 2v-8.54l.9-1.055"/><path d="m22 3-5 5"/><path d="m17 3 5 5"/></svg></span>
  <h2 data-od-slot="title">No invoices match these filters</h2>
  <p class="odl-lead odl-hint" data-od-slot="message">Your filters hide all 46 invoices. Remove one, or clear them all.</p>
  <ul class="odl-chips" aria-label="Filters on" data-od-list="filters">
    <li data-od-item><span data-od-slot="label">Status: Overdue</span><button type="button" aria-label="Remove filter Status: Overdue" data-od-action="remove"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M18 6 6 18"/><path d="m6 6 12 12"/></svg></button></li>
    <li data-od-item><span>Owner: Me</span><button type="button" aria-label="Remove filter Owner: Me" data-od-action="remove"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M18 6 6 18"/><path d="m6 6 12 12"/></svg></button></li>
    <li data-od-item><span>Over $10,000</span><button type="button" aria-label="Remove filter Over $10,000" data-od-action="remove"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M18 6 6 18"/><path d="m6 6 12 12"/></svg></button></li>
  </ul>
  <div class="odl-acts"><button type="button" class="odl-btn" data-od-action="clear">Clear all filters</button></div>
  <p class="odl-live" role="status"></p>
</section>
<script>
document.querySelectorAll(".odl-empty-filtered").forEach(function (root) {
  if (root.hasAttribute("data-odl-wired")) return;
  root.setAttribute("data-odl-wired", "");
  var live = root.querySelector(".odl-live"), chips = root.querySelector(".odl-chips");
  function left() { return chips.querySelectorAll("li").length; }
  root.addEventListener("click", function (e) {
    var x = e.target.closest("[data-od-action='remove']"), all = e.target.closest("[data-od-action='clear']");
    if (x) {
      var li = x.closest("li"), next = li.nextElementSibling || li.previousElementSibling;
      live.textContent = "Removed " + li.querySelector("span").textContent + ".";
      li.remove();
      (next ? next.querySelector("button") : root.querySelector("[data-od-action='clear']")).focus();
    }
    if (all) { chips.textContent = ""; live.textContent = "All filters cleared. Showing all 46 invoices."; }
    if (!left()) root.querySelector(".odl-hint").textContent = "No filters on. In an app, the full list shows here.";
  });
});
</script>

More like this

B2BQuiet · Any product

Card skeleton

A grid of cards that holds each photo, title, detail and price in place while it loads.

B2BQuiet · Any product

Maintenance page

A planned-downtime page that says what is paused.

B2BQuiet · Any product

No access page

A 403 page that says who owns the page and lets the person ask for access with an.

Your kit

Nothing here yet. Add parts with Add to kit, and a look if you want the whole system.

    Parts
    0
    Files to fetch
    0 KB
    Licence
    MIT
    Total
    Free, now and later

    How do you want it?

    Your prompt

    No sign-up. Nothing leaves your browser until you paste it.

    Free