Skip to content

Latest commit

 

History

History
25 lines (18 loc) · 1013 Bytes

click-away-listener.md

File metadata and controls

25 lines (18 loc) · 1013 Bytes
product title components githubLabel
material-ui
Detect click outside React component
ClickAwayListener
component: ClickAwayListener

Click-Away Listener

The Click-Away Listener component detects when a click event happens outside of its child element.

Migrate to MUI Base

:::warning Click-Away Listener is now part of the standalone MUI Base component library. It is currently re-exported in @mui/material for convenience, but it may be deprecated in a future major version of Material UI.

To continue using this component and avoid future breaking changes, we strongly recommend that you install MUI Base and import this component from the @mui/base package:

import ClickAwayListener from '@mui/base/ClickAwayListener';

Please refer to the Click-Away Listener component page in the MUI Base docs for examples and details on usage. :::