ColorSchemePicker is controlled through value and onChange. Supply the three labels from your application. Selecting a scheme does not persist it or change a theme provider automatically.
ColorScheme values are capitalized, while ThemeProvider expects light or dark. Map Light and Dark to their lowercase names and resolve System from the system preference before passing the result to the provider. The three previews are separate button controls with Enter and Space activation. Their accessible names are Light, Dark, and System; the label props change only the visible captions. The selected checkmark is visual.
Props
string
Class applied to the outer container.
string
required
Visible caption for the dark scheme. The control’s accessible name remains Dark.
string
required
Visible caption for the light scheme. The control’s accessible name remains Light.
(value: ColorScheme) => void
required
Called with the newly selected color scheme.
string
required
Visible caption for the system scheme. The control’s accessible name remains System.
"Dark" | "Light" | "System"
required
Selected scheme: Light, Dark, or System. The application resolves system to a concrete theme.