Forms and controls
Toggle
SMRTToggle - An accessible toggle/switch component Features: - Native checkbox semantics for accessibility - Bindable checked state - Disabled state - Labels on either side - Size variants - Material 3 stylingPublic export
typescript
import { Toggle } from '@happyvertical/smrt-ui/forms';- Import path
@happyvertical/smrt-ui/forms- Props
- 10
- Props described
- 10 of 10
- Bindable state
- 0
- Callback events
- 1
- Verified release
- 0.44.0
Props
NameTypeRequiredDescription
checkedbooleanNoWhether the toggle is checkeddisabledbooleanNoWhether the toggle is disablednamestringNoName attribute for form submissionvaluestringNoValue attribute for form submissionlabelstringNoLabel textlabelPosition'left' | 'right'NoPosition of the labelsize'sm' | 'md' | 'lg'NoSize variantidstringNoID for the input elementariaLabelstringNoARIA label for accessibilityonchange(checked: boolean) => voidNoChange callbackBindable state
This component has no bindable public state.
Callback events
onchange(checked: boolean) => void