# How can I make a like button?

**URL:** <https://community.glideapps.com/t/how-can-i-make-a-like-button/64767>\
**Category:** Ask for Help\
**Created:** [August 7, 2023, 10:07am UTC](https://community.glideapps.com/t/how-can-i-make-a-like-button/64767 "2023-08-07T10:07:38Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![hezeking](https://avatars.discourse-cdn.com/v4/letter/h/5e9695/32.png) [@hezeking](https://community.glideapps.com/u/hezeking)\
**Post date:** [August 7, 2023, 10:07am UTC](https://community.glideapps.com/t/how-can-i-make-a-like-button/64767/1 "2023-08-07T10:07:38Z")

</div>

How can I create a button that increases the number of likes on a post by one and decreases it by one when clicked again? It also must go from a hollow heart (when not clicked) to a filled heart (when clicked)

---

<div class="post-metadata">

**Author:** ![Laurent\_Maleville](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/laurent_maleville/32/8643_2.png) [@Laurent\_Maleville](https://community.glideapps.com/u/Laurent_Maleville)\
**Post date:** [August 7, 2023, 9:16pm UTC](https://community.glideapps.com/t/how-can-i-make-a-like-button/64767/2 "2023-08-07T21:16:48Z")

</div>

Hi @hezeking,

First, in your data, you create 4 columns :

1. Number Column for Likes
2. Image Column for hollow heart (IMG 1)
3. Image Column for filled heart (IMG 2)
4. If-Then-Else Column with this : If Likes \> 0 then “IMG2” else “IMG1”

Something like that :

 ![Capture d’écran 2023-08-07 à 23.12.22](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/3/2/32a812a0e3c40626f84a25c82a3b1a9aa339a12a.png)

After, in your layout, add a component image with the If-then-else column

Finally, you must create an action like this :

 ![Capture d’écran 2023-08-07 à 23.14.30](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/7/b/7b6d61e57f2e0dd05571dfb99769023cd7b49f81.png)

The result must be something like this :
