unpkg CDN sanity check

This page loads the guarded definition helper from unpkg and registers the element when supported. The package is not published yet; until then, the original list remains available without filter controls. Read the README.

Import and call the registration helper

<script type="module">
  import { defineListFilter } from
    'https://unpkg.com/@aarongustafson/list-filter@latest/define.js?module';
  defineListFilter();
</script>

<list-filter for="drinks" categories></list-filter>
<ul id="drinks">
  <li data-category="hot">Lemon tea</li>
  <li data-category="cold">Sparkling water</li>
</ul>
  • Lemon tea
  • Sparkling water