Kebechet.Blazor.EventHandlers.ShortClick 2.0.0

Prefix Reserved
dotnet add package Kebechet.Blazor.EventHandlers.ShortClick --version 2.0.0                
NuGet\Install-Package Kebechet.Blazor.EventHandlers.ShortClick -Version 2.0.0                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Kebechet.Blazor.EventHandlers.ShortClick" Version="2.0.0" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Kebechet.Blazor.EventHandlers.ShortClick --version 2.0.0                
#r "nuget: Kebechet.Blazor.EventHandlers.ShortClick, 2.0.0"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install Kebechet.Blazor.EventHandlers.ShortClick as a Cake Addin
#addin nuget:?package=Kebechet.Blazor.EventHandlers.ShortClick&version=2.0.0

// Install Kebechet.Blazor.EventHandlers.ShortClick as a Cake Tool
#tool nuget:?package=Kebechet.Blazor.EventHandlers.ShortClick&version=2.0.0                

Blazor.EventHandlers.ShortClick

This package contains @onshortclick event handler.

Motivation: In order to unify development experience among multiple platforms I have decided to create onshortclick event for cases when you would like to use @onlongpress event handler. Because for example on Windows browser onclick event is triggered even after holding mousedown for more than 500ms. On the other side mobile devices behave differently. And onclick is not triggered after more than 400-500ms .

  • usage:
<button @onshortclick="OnShortClick">Click me</button>

or the combination with @onlongpress:

<button @onlongpress="OnLongPress" @onshortclick="OnShortClick">Click or longpress me</button>

TODO

  • minification
  • build and publish pipeline
  • tests

License

This repository is licensed with the MIT license.

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
2.0.0 1,112 6/23/2024
1.0.2 965 10/8/2023
1.0.1 170 7/4/2023
1.0.0-preview3 127 5/29/2023
1.0.0-preview2 121 5/28/2023
1.0.0-preview1 124 5/28/2023

.NET8 bump