Get the action
npx lomer-ui action outside-click
Action
Outside Click
Detects clicks outside a specified element.
Installation
Get the action
npx lomer-ui action outside-click
Usage
Preview
Svelte Code
1 | |
2 | |
3 | |
4 | |
5 | |
6 | |
7 | |
8 | |
9 | |
10 | |
11 | |
12 | |
13 | |
14 | |
15 | |
16 | |
17 | |
18 | |
19 | |
20 | |
21 | |
22 | |
Parameters
Parameter | Type | Description |
---|---|---|
callback | (event: MouseEvent) => void | A function that executes when a click outside node is detected. |