@jill64/svelte-device-theme
TypeScript icon, indicating that this package has built-in type declarations

1.2.19 • Public • Published

@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

Package Sidebar

Install

npm i @jill64/svelte-device-theme

Weekly Downloads

18,403

Version

1.2.19

License

MIT

Unpacked Size

4.21 kB

Total Files

5

Last publish

Collaborators

  • jill64