# Dynamic tab icons

**URL:** <https://forum.ionicframework.com/t/dynamic-tab-icons/106755>\
**Category:** ionic-v3\
**Created:** [September 26, 2017, 9:16am UTC](https://forum.ionicframework.com/t/dynamic-tab-icons/106755 "2017-09-26T09:16:04Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![sujit77](https://avatars.discourse-cdn.com/v4/letter/s/6bbea6/32.png) [@sujit77](https://forum.ionicframework.com/u/sujit77)\
**Post date:** [September 26, 2017, 10:52am UTC](https://forum.ionicframework.com/t/dynamic-tab-icons/106755/2 "2017-09-26T10:52:15Z")

</div>

I have done similar thing in non-Ionic projects/web-sites.

There are two ways of doing this -

1. Try changing your `element's class` name programetically(using JavaScript). This way you can give different class name to element and different CSS stylings(background image in this case).  
In Angular, you can do this using conditional classes. Look at [this stackoverflow answer](https://stackoverflow.com/questions/35269179/angular-conditional-class-with-ngclass).

2. Give `inline styling` and update them by JavaScript. Similar solution is present [here](https://forum.ionicframework.com/t/change-style-background-image-dynamically/52002/7) for Angular projects.

---

_[View the full topic](https://forum.ionicframework.com/t/dynamic-tab-icons/106755)._
