Substantive.Blazor.Captcha 9.4.0-build20260410r1

Blazor.Captcha

Blazor.Captcha is a .NET 10 Blazor component library for integrating CAPTCHA widgets (Google reCAPTCHA v2/v3 and hCaptcha) into Blazor WebAssembly and Server applications. It provides reusable components, JSInterop adapters, and flexible configuration for secure user validation.

Features

  • Google reCAPTCHA v2: Interactive challenge widget.
  • Google reCAPTCHA v3: Background risk scoring and badge.
  • hCaptcha: Privacy-focused CAPTCHA alternative.
  • Blazor-idiomatic API: Use as Razor components with event callbacks.
  • Culture, theme, and position customization.
  • AOT compatible and supports .NET 10.
  • JSInterop adapters for script management and event handling.
  • Extensive logging via ILogger.

Installation

  1. Add the NuGet package to your project:
dotnet add package Blazor.Captcha
  1. Register required services in your Program.cs:
builder.Services.AddBlazorCaptcha();

Usage

Google reCAPTCHA v2

@using Substantive.Blazor.Captcha

<ReCaptchaV2 SiteKey="your-site-key"
             OnSuccess="HandleSuccess"
             OnExpired="HandleExpired" />

Google reCAPTCHA v3

@using Substantive.Blazor.Captcha

<ReCaptchaV3 SiteKey="your-site-key"
             Position="ReCaptchaV3Position.BottomRight"
             OnSuccess="HandleSuccess" />

hCaptcha

@using Substantive.Blazor.Captcha

<HCaptcha SiteKey="your-hcaptcha-site-key"
          Size="HCaptchaSize.Normal"
          OnSuccess="HandleSuccess"
          OnExpired="HandleExpired" />

Event Callbacks

  • OnSuccess: Invoked with the CAPTCHA token when completed.
  • OnExpired: Invoked when the challenge expires.

Resetting Captcha

Each component exposes a ResetCaptcha() method to allow users to retry the challenge.

Configuration

  • Culture: Set via the Culture parameter (e.g., "en", "fr").
  • Theme: Automatically detects dark/light theme for reCAPTCHA v3.
  • Position: For reCAPTCHA v3 badge (BottomRight, BottomLeft, Inline).
  • Size: For hCaptcha (Normal, Compact, Invisible).

Advanced

  • JSInterop adapters (ReCaptchaV2JS, ReCaptchaV3JS, HCaptchaJS) can be injected for direct control.
  • Logging extensions for diagnostics.
  • Custom JSON converter for widget IDs.

Showing the top 20 packages that depend on Substantive.Blazor.Captcha.

Packages Downloads
Substantive.Metapackage.BlazorComponents
A metapackage contains all Blazor components.
7
Substantive.Metapackage.BlazorComponents
A metapackage contains all Blazor components.
8
Substantive.Metapackage.BlazorComponents
A metapackage contains all Blazor components.
9
Substantive.Metapackage.BlazorComponents
A metapackage contains all Blazor components.
10
Substantive.Metapackage.BlazorComponents
A metapackage contains all Blazor components.
12
Substantive.Metapackage.BlazorComponents
A metapackage contains all Blazor components.
13
Substantive.Metapackage.BlazorComponents
A metapackage contains all Blazor components.
14
Substantive.Metapackage.BlazorComponents
A metapackage contains all Blazor components.
19
Substantive.Metapackage.BlazorComponents
A metapackage contains all Blazor components.
39
Substantive.Metapackage.BlazorComponents
A metapackage contains all Blazor essential building blocks. It packed standalone Blazor components and extensions that often use such as Navigation, Exception Handling, Localization, etc,.
14

.NET 10.0

Version Downloads Last updated
9.4.0-build20260625R1 19 06/25/2026
9.4.0-build20260427R7 24 04/27/2026
9.4.0-build20260427R6 10 04/27/2026
9.4.0-build20260424R5 11 04/24/2026
9.4.0-build20260424R4 9 04/24/2026
9.4.0-build20260424R3 9 04/24/2026
9.4.0-build20260424R2 10 04/24/2026
9.4.0-build20260424R1 40 04/24/2026
9.4.0-build20260422R1 10 04/22/2026
9.4.0-build20260421R9 11 04/21/2026
9.4.0-build20260421R8 9 04/21/2026
9.4.0-build20260421R6 9 04/21/2026
9.4.0-build20260421R5 9 04/21/2026
9.4.0-build20260421R4 9 04/21/2026
9.4.0-build20260421R3 9 04/21/2026
9.4.0-build20260421R16 8 04/21/2026
9.4.0-build20260421R15 9 04/21/2026
9.4.0-build20260421R13 9 04/21/2026
9.4.0-build20260421R12 8 04/21/2026
9.4.0-build20260421R11 9 04/21/2026
9.4.0-build20260421R10 8 04/21/2026
9.4.0-build20260420R3 9 04/20/2026
9.4.0-build20260420R2 11 04/20/2026
9.4.0-build20260414R2 11 04/14/2026
9.4.0-build20260414R1 10 04/14/2026
9.4.0-build20260410R1 10 04/10/2026
9.4.0-build20260408R1 9 04/08/2026
9.4.0-build20260407R1 10 04/07/2026
9.4.0-build20260403R7 10 04/03/2026
9.4.0-build20260403R6 10 04/03/2026
9.4.0-build20260403R5 8 04/03/2026
9.4.0-build20260401R5 11 04/01/2026
9.4.0-build20260401R4 8 04/01/2026
9.4.0-build20260401R3 8 04/01/2026
9.4.0-build20260401R2 8 04/01/2026
9.4.0-build20260401R1 8 04/01/2026
9.4.0-build20260331R7 9 03/31/2026
9.4.0-build20260331R6 8 03/31/2026
9.4.0-build20260331R5 8 03/31/2026
9.4.0-build20260331R4 8 03/31/2026
9.4.0-build20260331R3 8 03/31/2026
9.4.0-build20260331R2 8 03/31/2026
9.4.0-build20260331R1 8 03/31/2026
9.4.0-build20260330R4 9 03/30/2026
9.4.0-build20260330R3 10 03/30/2026
9.4.0-build20260329R1 9 03/29/2026
9.4.0-build20260318R3 11 03/18/2026
9.4.0-build20260317R1 9 03/17/2026
9.4.0-build20260217R3 9 02/17/2026
9.4.0-build20260207R3 9 02/07/2026
9.4.0-build20260207R2 8 02/07/2026
9.4.0-build20260207R1 8 02/07/2026
9.4.0-build20260206R6 6 02/06/2026
9.4.0-build20260206R5 8 02/06/2026
9.4.0-build20260206R4 8 02/06/2026
9.4.0-build20260206R3 8 02/06/2026
9.4.0-build20260206R2 8 02/06/2026
9.4.0-build20260205R1 10 02/05/2026
9.4.0-build20260115R1 18 01/15/2026
9.4.0-build20260114R5 9 01/14/2026
9.4.0-build20260114R4 9 01/14/2026
9.4.0-build20260114R3 9 01/14/2026
9.4.0-build20260114R2 9 01/14/2026
9.4.0-build20260114R1 9 01/14/2026
9.4.0-build20260113R2 10 01/13/2026
9.4.0-build20260109R1 9 01/09/2026
9.4.0-build20251226R1 10 12/26/2025
9.3.3-build20251226R1 8 12/26/2025
9.3.2-build20251225R1 9 12/25/2025
9.3.0-build20251223R1 8 12/23/2025
9.2.0-build20251222R2 9 12/22/2025
9.2.0-build20251222R1 9 12/22/2025
9.1.0-build20251218R1 8 12/18/2025
9.1.0-build20251217R1 10 12/17/2025
9.1.0-build20251215R1 10 12/15/2025
9.1.0-build20251212R1 9 12/12/2025
9.1.0-build20251211R1 10 12/11/2025
9.1.0-build20251207R1 10 12/07/2025
9.1.0-build20251203R1 7 12/03/2025
9.1.0-build20251202R1 7 12/02/2025
9.1.0-build20251201R1 7 12/01/2025
9.1.0-build20251128R3 9 11/28/2025
9.1.0-build20251128R2 8 11/28/2025
9.1.0-build20251128R1 8 11/28/2025
9.0.4-build20251127R1 16 11/27/2025
9.0.4-build20251125R1 11 11/25/2025
9.0.4-build20251124R6 9 11/24/2025
9.0.4-build20251124R4 10 11/24/2025
9.0.4-build20250909R1 8 09/09/2025