@svelte-use/core
v0.11.0
Published
Collection of essential Svelte Utilities
Downloads
11
Readme
Svelte Use
Fork from @vueuse/vueuse
Install
npm i @svelte-use/core
Usage
<script>
import { usePreferredDark, usePreferredDark } from '@svelte-use/core'
// is user prefers dark theme
const isDark = usePreferredDark()
// persist state in localStorage
const storage = useLocalStorage({
'my-storage',
{
name: 'Apple',
color: 'red'
}
})
</script>
Refer to functions list or documentations for more detauls.
Thanks
This project is heavily inspired by the following awesome projects.
License
MIT license © 2021-PRESENT 2nthony