Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/propolies/svelte-outside

A svelte use directive for clicking/tapping outside an element.
https://github.com/propolies/svelte-outside

Last synced: 2 days ago
JSON representation

A svelte use directive for clicking/tapping outside an element.

Awesome Lists containing this project

README

        

# Svelte-outside

[![npm version](https://flat.badgen.net/npm/v/svelte-outside?color=orange)](https://npmjs.com/package/svelte-outside)

A svelte use directive for click/tap outside an element.

## Installation

```bash
npm install svelte-outside
```

## Usage

**Click outside**
```svelte

import { clickOutside } from "svelte-outside"

console.log("Clicked outside!")}>
Click outside me!

```

**Tap outside**
```svelte

import { tapOutside } from "svelte-outside"

console.log("Tap outside!")}>
Tap outside me!

```