interface ThemeSwitcherProps {
    dontSync?: boolean;
    styles?: Record<string, string>;
    targetId?: string;
    themeTransition?: string;
}

Properties

dontSync?: boolean

To stop persisting and syncing theme between tabs.

styles?: Record<string, string>

provide styles object imported from CSS/SCSS modules, if you are using CSS/SCSS modules.

targetId?: string

id of target element to apply classes to. This is useful when you want to apply theme only to specific container.

themeTransition?: string

force apply CSS transition property to all the elements during theme switching. E.g., all .3s