## Purpose
npm install svelte-click-outsideThis is a small helper component that lets you listen for clicks outside of an element. For example, if you want to close a popup when the user clicks outside of it.
Wrap the element in the component and listen for the clickoutside event:
``html
Click Outside Me
`
By default, clicking on any element outside of the wrapped element will cause the event to trigger. You can specify excluded elements that will not trigger the event.
For example, a button that triggers a popup must be excluded. Otherwise, it will immediately close the popup when it is opened.
The ClickOutside component has an exclude prop that expects an array of DOM nodes. Clicks on those nodes or their children will be ignored.
`html
I'm a panel!
``