# Show selected button with CSS

**URL:** https://community.glideapps.com/t/show-selected-button-with-css/68618
**Category:** Ask for Help
**Created:** [December 12, 2023, 4:38pm UTC](https://community.glideapps.com/t/show-selected-button-with-css/68618 "2023-12-12T16:38:31Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![Andrea\_Lasalandra](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/andrea_lasalandra/32/40767_2.png) [@Andrea\_Lasalandra](https://community.glideapps.com/u/Andrea_Lasalandra)
#### Post date: [December 12, 2023, 4:38pm UTC](https://community.glideapps.com/t/show-selected-button-with-css/68618/1 "2023-12-12T16:38:31Z")

</div>

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?

---

<div class="post-metadata">

### Author: ![ThinhDinh](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/thinhdinh/32/49_2.png) [@ThinhDinh](https://community.glideapps.com/u/ThinhDinh)
#### Post date: [December 13, 2023, 12:17am UTC](https://community.glideapps.com/t/show-selected-button-with-css/68618/2 "2023-12-13T00:17:09Z")

</div>

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

---

<div class="post-metadata">

### Author: ![Andrea\_Lasalandra](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/andrea_lasalandra/32/40767_2.png) [@Andrea\_Lasalandra](https://community.glideapps.com/u/Andrea_Lasalandra)
#### Post date: [December 15, 2023, 10:21am UTC](https://community.glideapps.com/t/show-selected-button-with-css/68618/3 "2023-12-15T10:21:08Z")

</div>

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

---

<div class="post-metadata">

### Author: ![ThinhDinh](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/thinhdinh/32/49_2.png) [@ThinhDinh](https://community.glideapps.com/u/ThinhDinh)
#### Post date: [December 15, 2023, 10:48am UTC](https://community.glideapps.com/t/show-selected-button-with-css/68618/4 "2023-12-15T10:48:17Z")

</div>

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

---

<div class="post-metadata">

### Author: ![Andrea\_Lasalandra](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/andrea_lasalandra/32/40767_2.png) [@Andrea\_Lasalandra](https://community.glideapps.com/u/Andrea_Lasalandra)
#### Post date: [December 15, 2023, 6:10pm UTC](https://community.glideapps.com/t/show-selected-button-with-css/68618/5 "2023-12-15T18:10:40Z")

</div>

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

---

<div class="post-metadata">

### Author: ![ThinhDinh](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/thinhdinh/32/49_2.png) [@ThinhDinh](https://community.glideapps.com/u/ThinhDinh)
#### Post date: [December 16, 2023, 1:09am UTC](https://community.glideapps.com/t/show-selected-button-with-css/68618/6 "2023-12-16T01:09:06Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![Andrea\_Lasalandra](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/andrea_lasalandra/32/40767_2.png) [@Andrea\_Lasalandra](https://community.glideapps.com/u/Andrea_Lasalandra)
#### Post date: [December 16, 2023, 9:44am UTC](https://community.glideapps.com/t/show-selected-button-with-css/68618/7 "2023-12-16T09:44:07Z")

</div>

Thank you very much for your help!
