This is a very simple but elegant toggle button design by Chris Gannon. It looks like a seesaw and when you toggle it it slides to the active direction.
If you are having trouble with the pen, try the archived copy on GitHub
Seesaw Tilt Toggle Snippet
See the Pen Tilt Toggle by Chris Gannon (@chrisgannon) on CodePen.default