Examples

Toggle switch with on and off states.
Properties
Required
The current state of the toggle switch.
true
represents the “on” state, false
represents the “off” state.Callback function called when the toggle state changes. Receives the new boolean value.
State
Controls whether the toggle switch is interactive. When
false
, the switch dims, ignores input and focus, and shows a forbidden cursor while still displaying its current on/off state.Best Practices
- Combine with
NeoHaptics
in theonChanged
callback for enhanced user experience on supported devices.
Integration Notes
- Input Methods: Supports both tap and drag interactions:
- Tap: Single tap anywhere on the switch toggles the state
- Drag: Horizontal drag allows intuitive dragging to toggle