API Reference
@themvora/daisyui · React
daisyUI adapter: theme variables mapped onto daisyUI's CSS variable contract.
useDaisyTheme(runtime, options?) installs the daisyUI adapter onto an
explicitly provided Themvora runtime and disposes it on unmount.
Generated from
packages/daisyui/srcbyapps/docs/scripts/generate-api-reference.mjs. Do not edit by hand — runpnpm --filter @themvora/docs api:generate.
Functions
useDaisyTheme<T extends ThemeDefinition<string>>(runtime, options?): void
React hook that installs the daisyUI adapter onto the given Themvora
runtime. The adapter maintains a tagged :root style element containing
concrete --color-* 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 { useDaisyTheme } from "@themvora/daisyui/react";
function App() {
useDaisyTheme(runtime);
return <YourApp />;
}See also: createDaisyAdapter
| 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
- daisyUI — the adapter integration