Documentation

    Type Alias DynamicTheme

    A custom theme that is enabled when various conditions are

    type DynamicTheme = {
        mediaQuery?: string;
        selector?: string;
        variables: ThemeVars;
    }
    Index

    Properties

    mediaQuery?: 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)'
    
    selector?: 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.

    MMNEPVFCICPMFPCPTTAAATR