Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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

NotificationsYou must be signed in to change notification settings

binsarjr/svelte-taphold

Repository files navigation

Minimalistic tap and hold component for Svelte/SvelteKit.

Installation

// Using Yarn to installyarn add --dev svelte-taphold// orif you prefer NPMnpm install --save-dev svelte-taphold

Usage Sample

<script>import {taphold }from'svelte-taphold'let ticks=0// show how many ticks button has been holdlet interval=100constonTapHold= ()=> ticks++constreset= ()=> ticks=0</script><h1>Tap and Hold {ticks}x</h1><labelfor="interval">Interval</label><inputid="interval"placeholder="interval"bind:value={interval}type="number"/><!-- svelte-taphold on button --><buttonuse:taphold={interval}on:taphold={onTapHold} >  Tap and Hold</button><buttonon:click={reset}>Reset Iteration</button>

About

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

Topics

Resources

Stars

Watchers

Forks

Sponsor this project

 

Packages

No packages published

Contributors3

  •  
  •  
  •  

[8]ページ先頭

©2009-2025 Movatter.jp