KITT.Web.ReCaptcha.Blazor 0.1.0

There is a newer version of this package available.
See the version list below for details.
dotnet add package KITT.Web.ReCaptcha.Blazor --version 0.1.0                
NuGet\Install-Package KITT.Web.ReCaptcha.Blazor -Version 0.1.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="KITT.Web.ReCaptcha.Blazor" Version="0.1.0" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add KITT.Web.ReCaptcha.Blazor --version 0.1.0                
#r "nuget: KITT.Web.ReCaptcha.Blazor, 0.1.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 KITT.Web.ReCaptcha.Blazor as a Cake Addin
#addin nuget:?package=KITT.Web.ReCaptcha.Blazor&version=0.1.0

// Install KITT.Web.ReCaptcha.Blazor as a Cake Tool
#tool nuget:?package=KITT.Web.ReCaptcha.Blazor&version=0.1.0                

KITT.Web.ReCaptcha.Blazor

This project add Google reCaptcha to your Blazor apps.<br/> This project targets .NET 7 as supported Framework version.

Installation

This project is available on NuGet.

It can be installed using the dotnet add package command or the NuGet wizard on your favourite IDE.

  dotnet add package KITT.Web.ReCaptcha.Blazor

Usage

The project gives you a Razor component which add the reCaptcha v2 widget.

Add the namespace KITT.Web.ReCaptcha.Blazor.v2 to your Razor Components or in the _Imports.razor file.

After that you can use the <ReCaptcha /> component in your EditForm like in this sample:

  <ReCaptcha SiteKey="<your reCaptcha v2 client key>"
             @bind-Value="yourPropertyToBind"
             Theme="Theme.Dark"
             Size="Size.Normal"
             TabIndex="1" />

  @code {
    private string yourPropertyToBind = string.Empty;
  }

Parameters

The component needs to be used inside an EditForm. It exposes the following properties:

Property Description
SiteKey (Required) string: the value of the v2 client site key
@bind-Value string: the property to bind
Theme Theme enum: the theme to use (default: Theme.Light)
Size Size enum: the size of the widget (default: Size.Normal)
TabIndex int: the tabIndex value (default: 0)
Id string: the id of the HTML element used to render the reCaptcha widget (default: "recaptcha")

Samples

In the samples folder you can find both Blazor WebAssembly and Blazor Server samples. The site key used in this samples is only for testing purpose.

Product Compatible and additional computed target framework versions.
.NET net7.0 is compatible.  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. 
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
1.0.3 118 10/29/2024
1.0.2 171 5/24/2024
1.0.1 319 12/9/2023
1.0.0 148 12/5/2023
0.2.1 152 11/10/2023
0.2.0 146 11/10/2023
0.1.0 183 8/9/2023