# Programatically add/remove custom badges to notebook cells

**URL:** <https://discourse.jupyter.org/t/programatically-add-remove-custom-badges-to-notebook-cells/2309>\
**Category:** JupyterLab\
**Created:** [October 3, 2019, 12:55pm UTC](https://discourse.jupyter.org/t/programatically-add-remove-custom-badges-to-notebook-cells/2309 "2019-10-03T12:55:24Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Stefano\_Fioravanzo](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.jupyter.org/stefano_fioravanzo/32/849_2.png) [@Stefano\_Fioravanzo](https://discourse.jupyter.org/u/Stefano_Fioravanzo)\
**Post date:** [October 3, 2019, 12:55pm UTC](https://discourse.jupyter.org/t/programatically-add-remove-custom-badges-to-notebook-cells/2309/1 "2019-10-03T12:55:24Z")

</div>

I am building an extension that leverages on a custom left panel to change the notebook metadata and single cells metadata. I would love to be able to display some custom badges in the notebook’s cells based on their metadata, and be able to do this programmatically (e.g. get the active cell from NotebookPanel or list through all the notebook’s cells) by adding a specific badge (label + color) to a cell based on its metadata.  
I don’t really know where to begin to add custom widgets to a cell, any help would be really appreciated!

---

<div class="post-metadata">

**Author:** ![jtp](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.jupyter.org/jtp/32/19100_2.png) [@jtp](https://discourse.jupyter.org/u/jtp)\
**Post date:** [October 3, 2019, 6:01pm UTC](https://discourse.jupyter.org/t/programatically-add-remove-custom-badges-to-notebook-cells/2309/2 "2019-10-03T18:01:03Z")

</div>

@Stefano_Fioravanzo a good starting point could be to look at the [jupyterlab-celltags](https://github.com/jupyterlab/jupyterlab-celltags) extension to see how the tags are added to the left area.

That might not correspond exactly to what you want but could still be useful for inspiration.

---

<div class="post-metadata">

**Author:** ![Stefano\_Fioravanzo](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.jupyter.org/stefano_fioravanzo/32/849_2.png) [@Stefano\_Fioravanzo](https://discourse.jupyter.org/u/Stefano_Fioravanzo)\
**Post date:** [October 3, 2019, 6:40pm UTC](https://discourse.jupyter.org/t/programatically-add-remove-custom-badges-to-notebook-cells/2309/3 "2019-10-03T18:40:13Z")

</div>

@jtp Yes I gave already an extensive look at that extension to understand how to handle cell metadata. What I am missing is how to display custom elements in the notebook area. Like create my custom react component ad attach it to a cell, giving some coordinates or props to move it where I want
