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

PropTypeDescriptionDefault
classNamestringAdditional CSS classes to apply to the switch.-
defaultCheckedbooleanSpecifies 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"
variantIconbooleanDetermines whether an icon should be displayed within the switch.false
onChange(checked: boolean) => voidA callback function that is called when the switch's state changes.-