Substantive.Blazor.Captcha 9.4.0-build20260331r7

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.
2
Substantive.Metapackage.BlazorComponents
A metapackage contains all Blazor components.
3
Substantive.Metapackage.BlazorComponents
A metapackage contains all Blazor components.
4
Substantive.Metapackage.BlazorComponents
A metapackage contains all Blazor components.
5
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.
15
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,.
10

.NET 10.0

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