Show selected button with CSS

I have several buttons on my app and would like them to change color when selected to show the user which button has been selected. How do I achieve this with CSS?

How do you “select” a button though? Wouldn’t it be a case of clicking > running an action?

Yeah simply by clicking the button component, I would like the button to change color once selected

Then do you want to “undo” the coloring at one point?

Yes, just when another button is selected then the new button selected is colored and the previous button uncolored

I think you would have to tie the button actions to a few set column actions that sets a certain user-specific column in your data.

Show/hide different button blocks based on the value and modify their accents, though it will only work with 3 buttons at most.

1 Like

Thank you very much for your help!

1 Like