← Examples

Dark mode

The component is forced to dark mode via theme: 'dark', independent of the OS colour scheme preference.

Forced dark regardless of system appearance. Use theme: 'light' to force light on a dark OS.

View code
<label for="tags">Favourite albums</label>
<input id="tags" type="text" name="albums" />

<script type="module">
  import { Taga11y } from '../dist/taga11y.mjs';

  new Taga11y(document.getElementById('tags'), {
    suggestions: [
      'Abbey Road', 'Kind of Blue', 'The Dark Side of the Moon',
      'Thriller', 'Nevermind', 'Purple Rain', 'Born to Run',
      'Rumours', 'OK Computer', 'Blue',
    ],
    theme: 'dark',
  });
</script>