How to make icon act like button in nav bar?


#1

I have an icon heart on the nav bar inside a button element but the problem is when I click it, the whole button area gets animated.

Check out the SS.

https://gyazo.com/89252c30ebe2541c4b42fbafd61521f9

I want that When i click on it only the heart icon gets clicked not the area around it.
Please help thanks.


#2

Which version of ionic do you use? 1,2,3 ?


#3

i am using ionic 3. Please help


#4

you can use ion-button icon-only
like

<button ion-button icon-only>
  <ion-icon name="heart"></ion-icon>
</button>

check this link :
https://ionicframework.com/docs/api/components/button/Button/