Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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.
- Host: GitHub
- URL: https://github.com/binsarjr/svelte-taphold
- Owner: binsarjr
- Created: 2022-10-06T01:49:27.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2023-10-04T16:12:27.000Z (over 1 year ago)
- Last Synced: 2024-11-18T13:59:17.830Z (about 2 months ago)
- Topics: hacktoberfest, svelte, svelte-action, svelte-taphold, sveltekit
- Language: TypeScript
- Homepage: svelte-taphold.vercel.app
- Size: 63.5 KB
- Stars: 10
- Watchers: 2
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
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
```svelteimport { taphold } from 'svelte-taphold'
let ticks = 0 // show how many ticks button has been hold
let interval = 100const onTapHold = () => ticks++
const reset = () => ticks = 0Tap and Hold {ticks}x
IntervalTap and Hold
Reset Iteration
```