# Render modal from theme client-side plugin API

**URL:** <https://meta.discourse.org/t/render-modal-from-theme-client-side-plugin-api/94305>\
**Category:** Product Support\
**Created:** [August 9, 2018, 12:02pm UTC](https://meta.discourse.org/t/render-modal-from-theme-client-side-plugin-api/94305 "2018-08-09T12:02:33Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![Daniel\_Sousa](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/daniel_sousa/32/101511_2.png) [@Daniel\_Sousa](https://meta.discourse.org/u/Daniel_Sousa)\
**Post date:** [August 9, 2018, 12:02pm UTC](https://meta.discourse.org/t/render-modal-from-theme-client-side-plugin-api/94305/1 "2018-08-09T12:02:33Z")

</div>

Is there any way to render a modal from the theme javascript?

I was looking forward to render a modal similar to the one that shows up when changing avatar.

**Example:**

```
<script type="text/discourse-plugin" version="0.8">
  api.onPageChange((url, title) => {
    if (condition) {
     renderModal;
    }
  });
</script>

```

---

_[View the full topic](https://meta.discourse.org/t/render-modal-from-theme-client-side-plugin-api/94305)._
