DynamicTheme: { mediaQuery?: string; selector?: string; variables: ThemeVars }

A custom theme that is enabled when various conditions are

Type declaration

  • OptionalmediaQuery?: string

    An optional media query required for the given theme to be enabled. This is useful when you want the theme of your application to automatically switch depending on a media feature.

    '(prefers-color-scheme: dark)'
    
  • Optionalselector?: string

    An optional CSS selector required for the given theme to be enabled. This is useful when you have a manual theme switcher on your application that sets a top-level class name or data-attribute to control the current theme.

    '.data-dark'
    
  • variables: ThemeVars

    The theme definitions that will be set when the selector and mediaQuery criteria are matched.