Switch
A switch control contains a knob that slides along a track. All parts are required to make a switch.
| Type | Resource |
|---|---|
| Design | Figma |
| Web | Web Storybook |
| Code | Gitlab |

Usage
import id.co.biofarma.binduiandroid.components.switch.SwitchSwitch(
id = "switch",
variant = "primary",
size = "sm",
radius = radius,
mode = mode,
checked = true,
disabled = false,
onChange = {value ->
println("Switch is now: $value")
},
label = "switch",
labelPosition = "right",
)Examples
Label Position
Use label position for change label position: left or right

Variant (Optional)
Use variant for change variant of switch component: primary, secondary or tertiary

Size (Optional)
Use size for change size of switch component: sm, md or lg

Props
| Props | Required | Default | Type | description |
|---|---|---|---|---|
| id | true | switch | string | For set the id of switch component. |
| label | true | switch | string | For set the label of switch component. |
| labelPosition | false | left | left right | For change the label position left or right. |
| variant | false | primary | primary secondary tertiary | For change the variant of switch component. |
| size | false | sm | sm md lg | For change the size of switch component. |
| checked | true | false | boolean | For toggle check or not-checked on switch component. |
| disabled | false | false | boolean | For toggle disable or not-disabled on switch component. |
| mode | false | light | light dark | For change color mode light or dark. |