Backpack switch component.
npm install bpk-component-switch --save-dev
import React from 'react';
import BpkSwitch from 'bpk-component-switch';
export default () => (
<div>
<BpkSwitch label="Switched on" checked />
<BpkSwitch label="Turned off" />
</div>
)
Property | PropType | Required | Default Value |
---|---|---|---|
label | Node | true | - |
className | string | false | null |
small | boolean | false | false |
This component uses a hidden <input type="checkbox" />
, so it supports all the same properties as it (for example checked
).
switchCheckedColor