How to *efficiently* create a toggle button (with text) that has a pressed state?

G’day all

I’m working on a button component that contains an icon + text, with various stateful animations to toggle between. I hate to ask, but it’s going to be easier to understand what I’m trying to do with a video overview. TIA for any help!

Ok, I got it working! I ended up making the background shape on hover and pressed a separate interactive component that’s then dropped in to the Icon + Label component. Effectively two buttons in one…I don’t love it, but it works.

Glad you made it! Thanks for sharing your approach. It sounds amazing.