Tonic UI
Getting StartedColor ModeColor StyleVersionsContributing
THEME
BordersBreakpointsColorsOutlinesPositionsSpacingSizesShadowsTypography
BUILDING BLOCKS
BoxControlBox
UTILITIES

Color Modes

ColorModeProvider

Use the ColorModeProvider to use color mode in your application. The color mode value can be one of dark or light. By default, the color mode is light if the value is not explicitly specified.

useColorMode Hook

To handle color mode manually in your application, use the useColorMode Hook to get current color mode or change the color mode.

Color schemes

To opt the entire page into the user's color scheme preferences declare color-scheme on the :root element.

DarkMode / LightMode

To force a specific color mode, wrap your component in LightMode or DarkMode, it will override the global color mode and set the color scheme to dark or light respectively.

EDITABLE EXAMPLE