Svelte 5
@theme-kit/svelte
Svelte 5Stores7 exports
Svelte 5 provider, context stores and runes-based reactivity.
Installation
Install the integration alongside @theme-kit/core.
pnpm add @theme-kit/svelteQuick Start
Complete copy-paste usage for this package.
1<script>
2 import { ThemeProvider } from "@theme-kit/svelte";
3</script>
4
5<ThemeProvider {themes} defaultTheme="light">
6 <App />
7</ThemeProvider>API Reference
Curated highlights below. The complete generated reference — every signature, parameter and type — is at /api-reference/svelte.
Provider
| Export | Description |
|---|---|
ThemeProvider | Context-based provider with DOM / CSS bindings. |
getThemeRuntime / setThemeRuntime | Context helpers. |
Stores
| Export | Description |
|---|---|
useTheme | Reactive readable stores for theme, mode and family. |
useThemeHistory / useThemeBatch | History and batching. |
useThemeSnapshot / useThemeRestore | Serialize / restore. |
useThemeLifecycle / useThemePacks | Events and packs. |
Components
| Export | Description |
|---|---|
ThemeScope | Scoped theming. |