This is a demo of a tri-state switch React Component using Framer Motion
Base code is from this codesandbox. Hope you enjoy :).
The original codesandbox is written with Framer Motion 2. Since then Framer Motion's version has been bumped to 4 and the animation seems not to be smooth as on the original sandbox. I will try fixing this issue when the time is convenient.