Switch
Components5.7.2
Switch
import Switch from '@semcore/ui/switch';
<Switch />;
type
SwitchProps
BoxProps & NeighborLocationProps & {...}
Property | Description |
---|---|
size "m" | "l" | "xl" = m | Switch size |
theme SwitchTheme = info | Switch theme |
Switch.Value
import Switch from '@semcore/ui/switch';
<Switch.Value />;
type
SwitchValueProps
BoxProps & NeighborItemProps & KeyboardFocusProps & {...}
Property | Description |
---|---|
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 />;
type
SwitchAddonProps
BoxProps & NeighborItemProps & {...}