Skip to content

clickOutside

Call callback when user clicks outside a given element

Usage

<div use:clickOutside={{ enabled: open, cb: () => (open = false) }} />

Installation

Terminal window
npx atmx add action click-outside