# How to use api to hide icons

**URL:** https://meta.discourse.org/t/how-to-use-api-to-hide-icons/118682
**Category:** Development
**Created:** [May 25, 2019, 7:18pm UTC](https://meta.discourse.org/t/how-to-use-api-to-hide-icons/118682 "2019-05-25T19:18:03Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Ellibereth](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/ellibereth/32/202896_2.png) [@Ellibereth](https://meta.discourse.org/u/Ellibereth)
#### Post date: [May 25, 2019, 7:18pm UTC](https://meta.discourse.org/t/how-to-use-api-to-hide-icons/118682/1 "2019-05-25T19:18:04Z")

</div>

Is there a method that lets you hide icons, similar to how `api.replaceIcon` lets you replace them?

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [May 26, 2019, 7:50am UTC](https://meta.discourse.org/t/how-to-use-api-to-hide-icons/118682/2 "2019-05-26T07:50:01Z")

</div>

I am not following, where do you want to “hide icons”? That would typically be CSS, nothing to do with the API.

---

<div class="post-metadata">

### Author: ![Ellibereth](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/ellibereth/32/202896_2.png) [@Ellibereth](https://meta.discourse.org/u/Ellibereth)
#### Post date: [May 26, 2019, 8:21am UTC](https://meta.discourse.org/t/how-to-use-api-to-hide-icons/118682/3 "2019-05-26T08:21:44Z")

</div>

Bit of an unusual use case: I wanted to show and hide certain things for different trust levels and I didn’t think I could do that with css without invoking primary groups but I figured out how to do it via [How to make a theme component for TL-based banner - #2 by Johani](https://meta.discourse.org/t/how-to-make-a-theme-component-for-tl-based-banner/88014/2). 🙂
