Skip to content

Svelte 5

@theme-kit/svelte

Svelte 5Stores7 exports

Svelte 5 provider, context stores and runes-based reactivity.

Install the integration alongside @theme-kit/core.

bash
pnpm add @theme-kit/svelte

Quick Start

Complete copy-paste usage for this package.

app.svelte
svelte
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

ExportDescription
ThemeProviderContext-based provider with DOM / CSS bindings.
getThemeRuntime / setThemeRuntimeContext helpers.

Stores

ExportDescription
useThemeReactive readable stores for theme, mode and family.
useThemeHistory / useThemeBatchHistory and batching.
useThemeSnapshot / useThemeRestoreSerialize / restore.
useThemeLifecycle / useThemePacksEvents and packs.

Components

ExportDescription
ThemeScopeScoped theming.
@theme-kit/svelte — Theme Kit