Astro
@themvora/astro
IntegrationIslandsZero-flash7 exports
Astro-native theming: integration bootstrap, a React-free <html> layout, and opt-in client islands.
Verified with Themvora 2.0.0·Updated 2026-09-17
Prerequisites
Package Manager
npm, pnpm, yarn, or bun
Dependencies
@themvora/core (peer dependency)
Use Case
Astro projects with theme support
Installation
Install the integration — @themvora/core is pulled in automatically as a dependency.
pnpm add @themvora/astroQuick Start
Complete copy-paste usage for this package.
import { defineConfig } from "astro/config";
import themvora from "@themvora/astro";
export default defineConfig({
integrations: [themvora()],
});API Reference
Curated highlights below. The complete generated reference — every signature, parameter and type — is at /api-reference/astro.
Integration
| Export | Description |
|---|---|
themvora() in astro.config.ts | Injects the pre-paint bootstrap into every page's <head>. |
No React required | The root entry and every server helper are framework-neutral. |
Server helpers
| Export | Description |
|---|---|
provider.astro | SSR-resolves the selection and paints the themed <html data-theme>. |
getInitialThemeState() | Resolve the initial state from Astro.request for island hydration. |
computeFingerprint | Cookie / config fingerprinting. Shared from @themvora/core so every integration writes a byte-identical value. |
Client islands (opt-in)
| Export | Description |
|---|---|
@themvora/astro/client | ThemeProviderClient, hooks and ThemeScope — the only React entry. |
getGlobalRuntime / setGlobalRuntime | Shared runtime across islands. |