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

Overview

Svelte Tap Hold

Minimalistic tap and hold component for Svelte/SvelteKit, see demo here.

Installation

// Using Yarn to install
yarn add --dev svelte-taphold

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

Usage Sample

<script>
  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
</script>

<h1>Tap and Hold {ticks}x</h1>
<label for="interval">Interval</label>
<input
  id="interval"
  placeholder="interval"
  bind:value={interval}
  type="number"/>

<!-- svelte-taphold on button -->
<button
  use:taphold={interval}
  on:taphold={onTapHold} >
  Tap and Hold
</button>

<button on:click={reset}>Reset Iteration</button>
You might also like...

Small TS library to type and safely handle `serde` JSON serializations of Rust enums.

rustie-ts TypeScript library with helper types and functions to type-safely handle Rust's serde JSON serialization of Enums. It can also be used stand

Jul 17, 2022

This is just a script I put together to check and notify me via email (MailGun) when there's an earlier date before my initial appointment date. It doesn't handle rescheduling.

This is just a script I put together to check and notify me via email (MailGun) when there's an earlier date before my initial appointment date. It doesn't handle rescheduling.

US-visa-appointment-notifier This is just a script I put together to check and notify me via email (MailGun) when there's an earlier date before my in

Jan 4, 2023

Some process handle JavaScript function parameter.

Function parameter handle or paremeter error control Example 1: Just checking if all arguments were passed / defined. const required = (name) = {

Mar 14, 2022

A set of useful helper methods for writing functions to handle Cloudflare Pub/Sub messages (https://developers.cloudflare.com/pub-sub/)

pubsub A set of useful helper methods for writing functions to handle Cloudflare Pub/Sub messages. This includes: A isValidBrokerRequest helper for au

Dec 4, 2022

A Discord.JS Command Handler to handle commands eaiser

TABLE OF CONTENTS Installation Setup Changing Default Prefix Creating a Command Usage of minArgs and maxArgs Syntax Errors Global Syntax Errors Per Co

Jun 8, 2022

Handle errors like it's 2022 šŸ”®

Handle errors like it's 2022 šŸ”® Error handling framework that is minimalist yet featureful. Features Minimalist API Custom error types Wrap any error'

Jan 7, 2023

Helper package to handle requests to a jschan api instance.

jschan-api-sdk Helper package to handle requests to a jschan api instance. How to use npm install ussaohelcim/jschan-api-sdk const { jschan } = requir

Jun 30, 2022

šŸ£ CLI to handle Private Git Submodules in your Vercel Project

šŸ£ CLI to handle Private Git Submodules in your Vercel Project

vercel-submodules: The CLI to handle Private Git Submodules in your Vercel Project This project is community-driven and not affiliated with Vercel in

Jan 1, 2023

Angular JWT refresh token with Interceptor, handle token expiration in Angular 14 - Refresh token before expiration example

Angular JWT refresh token with Interceptor, handle token expiration in Angular 14 - Refresh token before expiration example

Angular 14 JWT Refresh Token example with Http Interceptor Implementing Angular 14 Refresh Token before Expiration with Http Interceptor and JWT. You

Nov 30, 2022
Releases(v1.0.3)
  • v1.0.3(Nov 24, 2022)

    Features

    Event Listener for tap and hold action. support on desktop and mobile

    Full Changelog: https://github.com/binsarjr/svelte-taphold/commits/v1.0.3

    Source code(tar.gz)
    Source code(zip)
Owner
Binsar Dwi Jasuma
Mencoba adalah hal pertama yang harus dilakukan
Binsar Dwi Jasuma
Hemsida fƶr personer i Sverige som kan och vill erbjuda boende till mƤnniskor pƄ flykt

Getting Started with Create React App This project was bootstrapped with Create React App. Available Scripts In the project directory, you can run: np

null 4 May 3, 2022
Kurs-repo fƶr kursen Webbserver och Databaser

Webbserver och databaser This repository is meant for CME students to access exercises and codealongs that happen throughout the course. I hope you wi

null 14 Jan 3, 2023
A simple tap test runner that can be used by any javascript interpreter.

just-tap A simple tap test runner that can be used in any client/server javascript app. Installation npm install --save-dev just-tap Usage import cre

Mark Wylde 58 Nov 7, 2022
Relaxer-Javascript - A relaxing breathing app with a visual director to tell you when to breathe in, hold and breathe out

Relaxer-Javascript A relaxing breathing app with a visual director to tell you w

Tarokh Mohammadi 1 Feb 8, 2022
Do you wanna improve your Twitch chat interactivity? Hold my beer.

OpenTwitch ???? O que Ć© a OpenTwitch? A OpenTwitch Ć© uma aplicaĆ§Ć£o NodeJS desenvolvida ao vivo na twitch com o objetivo principal de fazer uma soluĆ§Ć£o

Jhonatan Junio 40 Dec 28, 2022
Brittle TAP test framework

brittle tap Ć  la mode A fullstack TAP test runner built for modern times. API Initializers To create a test the exported test method can be used in a

David Mark Clements 72 Dec 14, 2022
A lightweight normalized tap event

?? Retired: Tappy! Per our unmaintained repository status documentation this repository is now retired and is no longer accepting issue reports or pul

Filament Group 573 Dec 9, 2022
A Svelte parser that compiles to Mitosis JSON, allowing you to write Svelte components once and compile to every framework.

Sveltosis Still in development A Svelte parser that compiles to Mitosis JSON, allowing you to write Svelte components once and compile to every framew

sveltosis 70 Nov 24, 2022
Simple starter for SvelteKit with Tailwind CSS already set up and ready to go.

Get Started Simple Sveltekit boilerplate with Tailwind CSS already set up. Just run npm install to download the dependencies. Info I use Tailwind in p

Jordan 16 Dec 23, 2022
An example SvelteKit app implementing a simple authentication system.

SvelteKit Auth Example An example SvelteKit app implementing a variety of authentication backends View the demo NOTE: this is very much a work in prog

Dana Woodman 54 Dec 30, 2022