Components

The ThemeController components include the following:

  • ThemeController - The wrapper. Its props control available themes, default, and storage.
  • ThemeTile - A square preview tile for DaisyUI themes, showing four key theme colors.
  • useDaisyTheme - Composable for DaisyUI theme management and switching.

ThemeController

The ThemeController component is the wrapper. Its props control available themes, the default theme, and the storage mechanism for persistence.

ThemeTile

The ThemeTile component renders a square preview tile that visually represents a DaisyUI theme using its primary, secondary, accent, and neutral colors. It is used to give users a quick visual indication of a theme's palette, and is commonly used in theme switchers and pickers. You can control its size and theme via props.

useDaisyTheme

The useDaisyTheme composable provides a reactive API for managing DaisyUI themes in Nuxt and Vue apps. It supports switching, cycling, registering, and removing themes, and works with cookies, localStorage, or in-memory storage. Can be used globally (in app.vue) or per-component. Note: The "provides" documented below are actually the keys in the return object of the composable.