Component libraryVerification code

Verification code

Pro

A six-digit code input with paste and validation.

npx shadcn@latest add @tidal-pro/verification-code
Desktop viewport

Installation

Pro source is gated. Configure the @tidal-pro registry using the agent guide. Create an access key from your account after purchasing.

Terminal
npx shadcn@latest add @tidal-pro/verification-code

Import components/ui/tidal.css, components/ui/verification-code.css, then add the component inside a tidal-scope wrapper. Its scoped design tokens keep it independent of your existing CSS.

Usage

Complete example source · Dependency and asset manifest

Loading the complete example…

API & behavior

Required visible label, controlled value:string and onValueChange(string). Optional onComplete(code) fires after user edits produce a changed complete code; it does not fire on initial or external values and introduces no automatic submission. length(default6) floors/clamps1..8; nonfinite falls back6. ASCII digits only; render and edits remove other characters and truncate to length without mutating caller state on render. Native text input/ref/name/required/disabled/readOnly/id, keyboard, focus, blur, selection and composition attributes supported; pointer selection belongs to the slot row; className applies to input, rootClassName to wrapper. Numeric inputMode, exact-length minLength/pattern and one-time-code autocomplete(default) are provided; maxLength is omitted so formatted paste can be normalized. One accessible input owns Tab, arrows, Home/End, Shift selection, Backspace/Delete, clipboard and autofill; decorative slots are aria-hidden. Pointer selection focuses/selects a digit; shared frame follows native selection. Composition drafts retain native input text until commit; caller composition/select/focus/blur handlers compose. Optional description/error link with external aria-describedby; error sets aria-invalid and role=alert. formatCount localizes the visible count, linked to the input without live per-keystroke announcements. No verification, delivery, account access or code storage is introduced. Consumers own validation/authentication/network handling. Native autofill attributes are present; native IME and actual SMS/device autofill are not browser-tested. Reduced motion resolves frames and digits instantly.

Style with the --t-* CSS variables. Set data-theme="dark" on your tidal-scope wrapper for a dark surface. Motion respects the system’s reduced-motion preference.

Building with an agent?Give it the installation guide and component catalog.