How to get a toggle button slider with multi state(left, mid, and right)

I want to make a toggle button slider,
something like

The slider can be dragged right/left, and it will come back to the middle if not dragged far enough.
I guess I can work on a regular slider. But I don’t know how to style the slider to make it more like a toggle button.

Have you tried with max 3?

Yes, but I don’t know how to customize it (both function and appearance).

HI, did you found a solution?