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

1.2.21 • 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

/@jill64/svelte-device-theme/

    Package Sidebar

    Install

    npm i @jill64/svelte-device-theme

    Weekly Downloads

    4,857

    Version

    1.2.21

    License

    MIT

    Unpacked Size

    4.2 kB

    Total Files

    5

    Last publish

    Collaborators

    • jill64