Ecosyste.ms: Awesome

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

Awesome Lists | Featured Topics | Projects

https://github.com/binsarjr/svelte-taphold

A simple handle tap and hold action for Svelte/SvelteKit.
https://github.com/binsarjr/svelte-taphold

hacktoberfest svelte svelte-action svelte-taphold sveltekit

Last synced: about 1 month ago
JSON representation

A simple handle tap and hold action for Svelte/SvelteKit.

Awesome Lists containing this project

README

        

# Svelte Tap Hold
Minimalistic tap and hold component for Svelte/SvelteKit.

## Installation
```bash
// Using Yarn to install
yarn add --dev svelte-taphold

// or if you prefer NPM
npm install --save-dev svelte-taphold
```

## Usage Sample
```svelte

import { taphold } from 'svelte-taphold'

let ticks = 0 // show how many ticks button has been hold
let interval = 100

const onTapHold = () => ticks++
const reset = () => ticks = 0

Tap and Hold {ticks}x


Interval

Tap and Hold

Reset Iteration
```