Switch🌗
The switch is used to switch between two different states
Code demonstration
import { USwitch } from 'ungeui'
basic usage🖱️
Different sizes🔥
Custom value🌈
Props
Parameter | description | type | default value |
---|---|---|---|
checked | check | boolean | false |
size | switch size | 'small' | 'medium' | 'large' | 'medium' |
checkedValue | selected value | boolean | string | number | true |
uncheckedValue | not selected value | boolean | string | number | false |
on-Change | event triggered by the switch button | (e:MouseEvent) => void | undefined |