Welcome to the forum!
Not sure if this would work for your application, but 3 buttons all together should do the trick.
Put three buttons in one div all next to each other. Set the parent div to inline-block, or use a flexbox.
Each button will have a unique style, first, second and third.
First should have a left, top, bottom border, and no right.
Second should have a top and bottom border no right and left.
Third should have a right, top, bottom border with no left.
All should have full rounded corners 100px
The active state of each has an inverted background text. This will create the inside toggle illusion.
Might need to play with margin and padding to get the exact look your wanting.
Hope that helps.