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
- Host: GitHub
- URL: https://github.com/jill64/svelte-device-theme
- Owner: jill64
- License: mit
- Created: 2023-09-05T04:54:23.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2025-04-14T20:08:18.000Z (about 1 year ago)
- Last Synced: 2025-04-14T21:24:57.834Z (about 1 year ago)
- Topics: dark-mode, device, library, media, svelte, theme
- Language: TypeScript
- Homepage: https://svelte-device-theme.jill64.dev
- Size: 1.07 MB
- Stars: 0
- Watchers: 1
- Forks: 1
- Open Issues: 7
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# @jill64/svelte-device-theme
☯ 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)