rster2002 / svelte-outside-click

Handle clicks outside of your specified element.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Svelte Outside

Svelte Outside allows you to handle click events that occur outside of an element without having to wrap your elements inside of an component.

Basic Usage

Using Svelte Outside is as simple as adding two lines of code.

<div use:clickOutside={handleClickEvent}>
	<p>Nested</p>
</div>

<script>
import clickOutside from "svelte-outside-click";

function handleClickEvent() {
	// Your code here
}
</script>

About

Handle clicks outside of your specified element.

License:MIT License


Languages

Language:JavaScript 100.0%