Practic BUI (Base UI) - v1.0.0
    Preparing search index...
    • Shares the page's colour mode: the stored choice, or the system preference until one is made. The choice is stored through the registered persistence layer (localStorage by default) under the theme attribute. The mode is applied to <html> as a dark class (for Tailwind's dark: variant) and as color-scheme (for light-dark() and system colours such as Canvas), so pages and themes follow it.

      Returns {
          preference: ThemePreference;
          setPreference: Dispatch<SetStateAction<ThemePreference>>;
          theme: Theme;
          toggleTheme: () => void;
      }

      The mode shown, the stored preference, and ways to change them.