Base UI: CheckboxBase UI: Switch
An example of creating a switch component using Base UI and Motion for React. This examples uses CSS variables, spring and layout animations to animate the switch by switching justify-content.
Matt PerryJuly 30, 2025- React
Source code
Related examples
Base UI: Checkbox
Base UI: Context menu
Base UI: Dialog



