Skip to content

TkxCaptcha

import { TkxCaptcha } from 'tekivex-ui';

Captcha is part of the tekivex-ui library. Every component is self-tested against WCAG 2.1 AAA criteria, fully typed, and tree-shakeable. A third-party AAA audit is on the roadmap, not completed.

PropTypeRequiredDescription
providerCaptchaProviderWhich CAPTCHA provider to load. Defaults to “turnstile”.
sitekeystringyesPublic site key issued by the provider. Required.
themeCaptchaThemeVisual theme. “auto” follows the user’s OS preference (Turnstile only).
sizeCaptchaSizeWidget size. Provider support varies; “invisible” is reCAPTCHA-only.
languagestringOptional language/locale (ISO 639-1). Defaults to browser locale.
execution'render' | 'execute' | 'managed'Optional execution mode for Turnstile: “render"
onVerify(token: string) => voidyesCalled once the user has successfully solved the challenge.
onExpire() => voidCalled when an issued token expires (typically after 2-5 minutes).
onError(errorCode: string) => voidCalled on widget error. The provider’s raw error code is forwarded.
classNamestringOptional className applied to the host <div>.
styleReact.CSSPropertiesOptional inline style applied to the host <div>.
testModebooleanTest mode: render a stub that auto-verifies after 200ms. SSR-safe.
  • Keyboard navigation supported on all interactive elements
  • :focus-visible outline at 2px (theme-token primary)
  • ARIA roles and properties applied per WAI-ARIA 1.2
  • Respects prefers-reduced-motion
  • Minimum 44×44 touch target where applicable

The implementation lives at src/components/TkxCaptcha.tsx.

This page is a generated scaffold. It will be replaced with hand-authored examples and a live preview in a follow-up release. For interactive demos, see the legacy demo site.