Create an accessible animated toggle switch that toggles its state on click and supports keyboard activation.
Build a switch that flips between on and off states with a sliding knob animation. It must be usable with a mouse and keyboard.
Implement click and keyboard (Enter/Space) activation, and reflect the state with a checkable input (checkbox) for accessibility.
Animate the knob sliding between positions.
Test click and keyboard toggling.