@jill64/svelte-device-theme

npm-version npm-license npm-download-month npm-min-size ci.yml website

☯ A simple store that syncs with your device's theme settings

Demo

Demo

Usage

<script>
  import { is } from '@jill64/svelte-device-theme'
</script>

{#if is.dark}
  Device is dark mode
{:else}
  Device is light mode
{/if}

[!NOTE]
$isDark is undefined on the server.
If you need full theme management including SSR, please see @jill64/svelte-dark-theme.

License

MIT

Top categories

svelte logo

Need a Svelte website built?

Hire a professional Svelte developer today.
Loading Svelte Themes