Skip to content

Switch

Components
4.4.10

Switch

import Switch from '@semcore/ui/switch';
<Switch />;
interface
ISwitchProps extends IBoxProps, INeighborLocationProps
PropertyDescription
size
"m" | "l" | "xl" = m

Switch size

theme

Switch theme

Switch.Value

import Switch from '@semcore/ui/switch';
<Switch.Value />;
interface
ISwitchValueProps extends IBoxProps, INeighborItemProps, IKeyboardFocusProps
PropertyDescription
onChange
(checked: boolean, e: React.SyntheticEvent) => void

Handler on change

checked
boolean

Control state

defaultChecked
boolean = false

Initial state for uncontrolled mode

disabled
boolean

Disabled state

includeInputProps
string[]

The list of properties that can be placed in the hidden input

theme

Switch theme

Switch.Addon

import Switch from '@semcore/ui/switch';
<Switch.Addon />;
interface
ISwitchAddonProps extends IBoxProps, INeighborItemProps