@theme-kit/astro
v1.3.0
Published
Astro integration for Theme Kit.
Maintainers
Readme
@theme-kit/astro
Islands-friendly theming for Astro with a shared global runtime and zero-flash bootstrap.
Reference snippet
---
import { ThemeProviderClient } from "@theme-kit/astro";
import ThemeSwitcher from "../components/ThemeSwitcher.astro";
---
<ThemeProviderClient themes={themes} />
<ThemeSwitcher client:load />Provider
ThemeProviderClient island provider with the full hook set (useTheme, history, batch, snapshot, lifecycle, packs) and ThemeScope.
Bootstrap & Sync
createBlockingScript, buildThemeCssMap, darkModeCSSTemplate — zero-flash bootstrap; createAstroThemePersistence() persistence adapter; computeFingerprint() cookie/config fingerprinting; getGlobalRuntime() / setGlobalRuntime() share one runtime across islands.
Documentation
Full API reference and guides: Theme Kit docs. All packages: npm.
