Here is a material 3 segmented button made from anvil native m3 buttons. I.e, it is not a custom component - it is simply made by applying roles to the buttons.
I have hinted in other posts that the segmented button should be included in the material theme, but after I upgraded to m3 buttons, this is good enough for me.
A really, REALLY long time ago I started making this as a custom component for myself, back in the old Material Design. I abandoned the idea for custom styling the anvil_extras tabs, that made almost the same thin.
This is what I did (in the non-beta version of the Material Design 3) for a segmented button-tab hybrid:
I also did one that it’s only buttons, but the recent changes in style in both anvil_extras and native anvil kind of broke it and I didn’t fix it. Maybe I will shamelessly steal this from you hahaha.
Segmented buttons are part of material 3, so I still think the m3 theme should include one. There are some nice styling and animation effects that can be applied that this simple version does not have.