svelte-device-theme Svelte Themes

Svelte Device Theme

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

@jill64/svelte-device-theme

npm-version npm-license npm-download-month npm-min-size

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

Usage

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

{#if $isDark}
  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

Loading Svelte Themes