yarcl
    Preparing search index...

    Function applyTheme

    • Switches the whole app to another theme at runtime, without a rebuild.

      Injects the theme's generated CSS (replacing the build-time styles) and makes components read their defaults (defaults, components, heading levels) from the theme, re-rendering them. The theme must define the keys your app uses; bundled themes share the defaults' keys (ThemeContract), so any of them can replace another.

      Parameters

      Returns void

      import { applyTheme } from 'yarcl/css';
      import { themes } from 'yarcl/themes';

      applyTheme(themes.editorial);