Skip to content
Overlay ColorModeSelect

ColorModeSelect

A select of System, Light and Dark.

On this page

Examples

Color mode select

Razor
<div class="w-44">
    <KlyColorModeSelect data-testid="color-mode-select" />
</div>

API

KlyColorModeSelect

Select that offers system, light and dark color modes.

Parameters

Name Type Default Description
AriaLabel string Accessible name of the select. Defaults to the built-in text.
Class string Classes added to the root element, merged last so they win over the theme.
Color KlyColor "primary" Semantic color of the color mode select: a built-in KlyColor or the name of a color you defined. When not set, Color applies, else the default of the component. Values: primary, secondary, success, info, warning, error, neutral.
Size KlySize KlySize.Md Size of the color mode select, from Xs to Xl . When not set, Size applies, else the default of the component. Values: Xs, Sm, Md, Lg, Xl.
Ui ColorModeSelectUi Per-instance class overrides of the slots of the color mode select, see ColorModeSelectUi . They are merged after the theme and the Class parameter wins on the root slot.
Variant FieldVariant FieldVariant.Outline Look of the field: Outline , Soft , Subtle , Ghost or None . Values: Outline, Soft, Subtle, Ghost, None.

Ui slots

Ui takes a ColorModeSelectUi with one class string per slot, merged after the theme.

Slot Styles
Root Classes merged into the root slot of KlyColorModeSelect , after the theme and the app configuration.
Base Classes merged into the base slot of KlyColorModeSelect , after the theme and the app configuration.
TrailingIcon Classes merged into the trailingIcon slot of KlyColorModeSelect , after the theme and the app configuration.