Blazor.SignaturePad
7.1.1
See the version list below for details.
dotnet add package Blazor.SignaturePad --version 7.1.1
NuGet\Install-Package Blazor.SignaturePad -Version 7.1.1
<PackageReference Include="Blazor.SignaturePad" Version="7.1.1" />
paket add Blazor.SignaturePad --version 7.1.1
#r "nuget: Blazor.SignaturePad, 7.1.1"
// Install Blazor.SignaturePad as a Cake Addin #addin nuget:?package=Blazor.SignaturePad&version=7.1.1 // Install Blazor.SignaturePad as a Cake Tool #tool nuget:?package=Blazor.SignaturePad&version=7.1.1
SignaturePad
A simple to use blazor component to draw a signature. It supports both mouse and touch inputs and works on Blazor Server and Blazor WebAssembly.
See a live demo right here on github.
Installation
You can install from Nuget using the following command:
Install-Package Blazor.SignaturePad
Or via the Visual Studio package manger.
Basic usage
Start by adding the following using statement to your root _Imports.razor
.
@using SignaturePad
Next you should define a property in your class. For example:
public class MyInput
{
public byte[] Signature { get; set; } = Array.Empty<byte>();
}
You can then use it wherever you want.
<SignaturePad @bind-Value="Input.Signature" />
The control provides you the image data as base64 byte[]
To get the image, you'll need to convert to byte[]
into a string. For example:
public class MyInput
{
public byte[] Signature { get; set; }
public string SignatureAsBase64 => System.Text.Encoding.UTF8.GetString(Signature);
}
Providing options
You can configure the SignaturePad by providing a SignaturePadOptions
instance to the component.
<SignaturePad @bind-Value="Input.Signature" Options="_options" />
@code {
public MyInput Input { get; set; } = new();
private SignaturePadOptions _options = new SignaturePadOptions
{
LineCap = LineCap.Round,
LineJoin = LineJoin.Round,
LineWidth = 20
};
}
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net6.0 is compatible. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. 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. |
-
net6.0
- Microsoft.AspNetCore.Components.Web (>= 6.0.15)
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 | |
---|---|---|---|
9.0.0 | 395 | 11/14/2024 | |
8.1.5 | 9,629 | 7/23/2024 | |
8.1.4 | 472 | 7/15/2024 | |
8.1.3 | 410 | 7/3/2024 | |
8.1.2 | 133 | 7/2/2024 | |
8.1.0 | 391 | 7/2/2024 | |
8.0.6 | 1,193 | 6/11/2024 | |
8.0.0 | 15,287 | 11/20/2023 | |
7.5.0 | 3,387 | 11/6/2023 | |
7.4.2 | 3,007 | 9/4/2023 | |
7.4.1 | 424 | 8/30/2023 | |
7.4.0 | 2,667 | 6/30/2023 | |
7.3.0 | 1,105 | 6/14/2023 | |
7.2.0 | 248 | 6/12/2023 | |
7.1.2 | 240 | 6/7/2023 | |
7.1.1 | 3,249 | 4/12/2023 | |
7.1.0 | 338 | 4/11/2023 | |
7.0.4 | 266 | 4/4/2023 | |
7.0.3 | 963 | 3/13/2023 | |
7.0.2 | 363 | 2/23/2023 | |
7.0.1 | 499 | 11/29/2022 |