# Adding a button to expand / collapse collections

**URL:** https://community.glideapps.com/t/adding-a-button-to-expand-collapse-collections/82256
**Category:** Ask for Help
**Created:** [June 5, 2025, 3:38am UTC](https://community.glideapps.com/t/adding-a-button-to-expand-collapse-collections/82256 "2025-06-05T03:38:15Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![SteezyStan](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/steezystan/32/88905_2.png) [@SteezyStan](https://community.glideapps.com/u/SteezyStan)
#### Post date: [June 5, 2025, 3:38am UTC](https://community.glideapps.com/t/adding-a-button-to-expand-collapse-collections/82256/1 "2025-06-05T03:38:15Z")

</div>

Hi, I’m trying to create a running app where on the main screen I have a button that expands / collapses the 3 runs per week underneath it. I’m able to add the runs, but I’m not able to figure out a way for each button to expand and collapse them. I’d like each button to do that for the relevant week only. Any suggestions on how I can achieve that? Thanks!

---

<div class="post-metadata">

### Author: ![Jeff\_Hager](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/jeff_hager/32/43_2.png) [@Jeff\_Hager](https://community.glideapps.com/u/Jeff_Hager)
#### Post date: [June 5, 2025, 4:34am UTC](https://community.glideapps.com/t/adding-a-button-to-expand-collapse-collections/82256/2 "2025-06-05T04:34:29Z")

</div>

You may want to take a look at the Tabs or Tabs Container components. That will make the setup a lot easier. Otherwise, you need to add an action to your button that will set or insert a value that you can then use to control visibility of the components you want to show or hide.

---

<div class="post-metadata">

### Author: ![FloMo](https://avatars.discourse-cdn.com/v4/letter/f/f19dbf/32.png) [@FloMo](https://community.glideapps.com/u/FloMo)
#### Post date: [June 5, 2025, 8:55am UTC](https://community.glideapps.com/t/adding-a-button-to-expand-collapse-collections/82256/3 "2025-06-05T08:55:14Z")

</div>

I use the switch component with a bolean column either in the user table or the current table

 ![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/2/d/2d6ec8940a68ca9860da2c0a3b94d6c28f8ef09c.png)

 ![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/5/a/5ada397590334c519e2659457cbf7fcf92c7e5bc.png)  
I use a button with an action to clear filters.

You will use visibility conditions against the bolean column you created for any single component or for a container. In this case you can see I used it for a container.

---

<div class="post-metadata">

### Author: ![FloMo](https://avatars.discourse-cdn.com/v4/letter/f/f19dbf/32.png) [@FloMo](https://community.glideapps.com/u/FloMo)
#### Post date: [June 5, 2025, 9:01am UTC](https://community.glideapps.com/t/adding-a-button-to-expand-collapse-collections/82256/4 "2025-06-05T09:01:31Z")

</div>

Search @Robert_Petitto on Youtube. He has a gang of videos on custom filters. I think I learnt this method from one of his hundreds of videos. I just don’t remember which one.

---

<div class="post-metadata">

### Author: ![Sean\_Page](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/sean_page/32/77424_2.png) [@Sean\_Page](https://community.glideapps.com/u/Sean_Page)
#### Post date: [November 25, 2025, 1:32pm UTC](https://community.glideapps.com/t/adding-a-button-to-expand-collapse-collections/82256/5 "2025-11-25T13:32:04Z")

</div>

I like your toggle styling!
