Switch
Switch
jsx
import Switch from '@semcore/ui/switch';
<Switch />;SwitchProps
& & {...}| Name | Type | Description |
|---|---|---|
| size | "m" | "l" | "xl" | Switch size |
| theme | Switch theme |
Switch.Value
jsx
import Switch from '@semcore/ui/switch';
<Switch.Value />;SwitchValueProps
& & {...}| Name | Type | Description |
|---|---|---|
| onChange | (checked: boolean, e: React.SyntheticEvent<>) => void | Handler on change |
| checked | boolean | Control state |
| defaultChecked | boolean | 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
jsx
import Switch from '@semcore/ui/switch';
<Switch.Addon />;SwitchAddonProps
& & {...}| Name | Type | Description |
|---|---|---|
| hidden | boolean | Deprecated |