Trails Packages
    Preparing search index...

    Interface ThemeService

    A Theme Service that provides methods to interact with the chakra theme.

    e.g. change the color mode of the application. or update the system config of the application.

    interface ThemeService {
        colorMode: ColorModeValue;
        systemColorMode: ColorModeValue;
        systemConfig: SystemConfig | undefined;
        setColorMode(value: ColorModeValueSupplier | ColorModeValue): void;
        setSystemConfig(
            value: ChakraSystemConfigSupplier | SystemConfig | undefined,
        ): void;
    }

    Hierarchy (View Summary)

    Index

    Properties

    colorMode: ColorModeValue

    The currently active color mode. It is reactive. Defaults to `"light".

    systemColorMode: ColorModeValue

    The color mode preferred by the system (browser or operating system).

    systemConfig: SystemConfig | undefined

    The currently active system config.

    Methods

    • Updates the system config of the application. Can be called with a direct value or a function that returns a value. The function form allows the use of reactive values, which will automatically trigger a system config update.

      Parameters

      Returns void