---
title: Click away listener React component
components: ClickAwayListener
---

# Click away listener

<p class="description">Listen for click events that occur somewhere in the document, outside of the element itself.</p>

## Simple menu

For instance, if you need to hide a menu when people click anywhere else on your page:

{{"demo": "pages/utils/click-away-listener/ClickAway.js"}}

You can find a more advanced demo on the [menu documentation section](/demos/menus#menulist-composition).
