product | title | components | githubLabel |
---|---|---|---|
material-ui |
Detect click outside React component |
ClickAwayListener |
component: ClickAwayListener |
The Click-Away Listener component detects when a click event happens outside of its child element.
:::info
Click-Away Listener is a part of the standalone MUI Base component library.
It is currently re-exported from @mui/material
for your convenience, but it will be removed from this package in a future major version, after @mui/base
gets a stable release.
Please refer to the Click-Away Listener component page in the MUI Base docs for examples and details on usage. :::