API Reference
@themvora/shadcn · React
shadcn/ui adapter: token variables plus framework bindings for React, Vue, Svelte, Solid and Angular.
useShadcnTheme(runtime, options?) installs the shadcn adapter onto an
explicitly provided Themvora runtime and disposes it on unmount.
Generated from
packages/shadcn/srcbyapps/docs/scripts/generate-api-reference.mjs. Do not edit by hand — runpnpm --filter @themvora/docs api:generate.
Functions
useShadcnTheme<T extends ThemeDefinition<string>>(runtime, options?): void
React hook that installs the shadcn adapter onto the given Themvora
runtime. The adapter maintains a tagged :root style element containing
concrete --* variables in sync as the theme changes.
Call once in your app root, passing the runtime from your Themvora
provider (e.g. the useThemeRuntime() hook from @themvora/react):
import { useShadcnTheme } from "@themvora/shadcn/react";
function App() {
useShadcnTheme(runtime);
return <YourApp />;
}See also: createShadcnAdapter
| Parameter | Type | Description |
|---|---|---|
runtime | ThemeRuntime<T> | The active Themvora runtime to install the adapter on. |
options | { strategy?: AdapterStrategy } (optional) | Adapter options. Defaults to {}. |
Returns void
Related docs
- shadcn/ui — the adapter integration