API Reference
@themvora/open-props · Solid
Open Props adapter: map theme tokens onto Open Props custom properties.
useOpenPropsTheme(runtime, options?) installs the Open Props adapter onto
an explicitly provided Themvora runtime and disposes it on cleanup.
Generated from
packages/open-props/srcbyapps/docs/scripts/generate-api-reference.mjs. Do not edit by hand — runpnpm --filter @themvora/docs api:generate.
Functions
useOpenPropsTheme<T extends ThemeDefinition<string>>(runtime, options): ThemeAdapter<T>
Solid composable that installs the Open Props adapter onto the given Theme
Kit runtime. Maintains a tagged :root style element with concrete
--brand, --link, --size-* and related variables, kept in sync as the
active theme changes.
Must be called within a Solid reactive root, passing the runtime from your
Themvora provider (e.g. useThemeRuntime() from @themvora/solid):
import { useOpenPropsTheme } from "@themvora/open-props/solid";
function App() {
useOpenPropsTheme(runtime);
return <YourApp />;
}See also: createOpenPropsAdapter
| Parameter | Type | Description |
|---|---|---|
runtime | ThemeRuntime<T> | The active Themvora runtime to install the adapter on. |
options | UseAdapterOptions | Adapter options. Defaults to {}. |
Returns ThemeAdapter<T> — The installed adapter instance.
Interfaces
UseAdapterOptions
Options accepted by the Solid adapter composables (e.g. useOpenPropsTheme).
| Member | Type | Description |
|---|---|---|
strategy (optional) | AdapterStrategy | The adapter strategy to use. When omitted, the adapter's default strategy applies. |
Related docs
- Open Props — the adapter integration