Docs
Switch
Switch
Displays a button or a component that looks like a button.
Usage
Example Code
1import { Switch } from "inc-design-system/switch";
Example Code
1<Switch />
Props
Switch
Prop | Type | Description | Default |
---|---|---|---|
className | string | Additional CSS classes to apply to the switch. | - |
defaultChecked | boolean | Specifies whether the switch should be on (true) or off (false) by default. | false |
size | "small" | "medium" | "large" | Determines the size of the switch. Available options are small, medium, and large. | "medium" |
variantIcon | boolean | Determines whether an icon should be displayed within the switch. | false |
onChange | (checked: boolean) => void | A callback function that is called when the switch's state changes. | - |