Close dbc.Collapse content upon clicking outside container

Hello,

Is there a way to close a dbc.Collapse container by clicking outside the container? Currently, I can only close it the same way I open it, which is by clicking the button with the n_clicks property.

This behaviour is achievable by default with a modal, but not a Collapse.

Would really appreciate any tips to achieve this behaviour as I feel it is crucial for a good UX for the end-user.