import { PSwitch } from 'pearkit';Standard switch component for form components
const [value, setValue] = useState(false);
<PSwitch checked={value} onChange={() => setValue(!value)}/>Since we use the tailwind color palette in our design, you can use the names of all tailwind colors as props. For example : sky red indigo
<PSwitch disabled color="orange" />For the disabled property, it is sufficient to provide the property itself directly.
<PSwitch disabled />None
Here you can see all the working features for the switch component.
| Name | Type | Default | Description |
|---|---|---|---|
| color | TwColor | blue | Color of switch component. |