shadcn.io
useOnClickOutside
22/34
shadcn.io
/
useOnClickOutside
Preview
Code
Install
Docs
All
Hooks
22 of 34
Click Outside Demo
Dismiss by clicking outside
Interactive Box
Click to activate
Outside Clicks
0
Box is inactive
Reset
Supports multiple refs, touch events, focus events