Please refer to the Click-Away Listener component page in the Base UI docs for demos and details on usage.
Click-Away Listener is a part of the standalone Base UI 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.