An open API service indexing awesome lists of open source software.

https://github.com/jill64/svelte-device-theme

☯ A simple store that syncs with your device's theme settings
https://github.com/jill64/svelte-device-theme

dark-mode device library media svelte theme

Last synced: about 1 year ago
JSON representation

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

Awesome Lists containing this project

README

          

# @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](https://svelte-device-theme.jill64.dev)

## [Demo](https://svelte-device-theme.jill64.dev)

## Usage

```svelte

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

{#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](https://github.com/jill64/svelte-dark-theme).

## License

[MIT](LICENSE)