Verification code preview
A six-digit code input with paste and validation.
pro · Forms · composite
When to use
- Use it when a page needs a six-digit code input with paste and validation.
- Choose it when the host application can supply the required state and keep business logic outside the presentation component.
Alternatives
- Choose form-field instead when a labeled email field with validation and help text is the actual interface need, rather than verification code.
Configure components.json and the @tidal-pro namespace before installing Pro components.
Installation
npx shadcn@latest add @tidal-pro/verification-codeImport components/ui/tidal.css, components/ui/verification-code.css. Wrap installed components in tidal-scope.
Preview

Minimal example
import"./components/ui/tidal.css";
import"./components/ui/verification-code.css";
import{TidalVerificationCode}from"./components/ui/verification-code";
export default()=><div className="tidal-scope"><TidalVerificationCode label={"Demo"} onValueChange={() => {}} value={"value"}/></div>;API and props
TidalVerificationCode.label (required)stringRequired label value accepted by this exported component.
TidalVerificationCode.onValueChange (required)(value: string) => voidCallback invoked when the value change interaction is proposed.
TidalVerificationCode.value (required)stringRequired value value accepted by this exported component.
TidalVerificationCode.descriptionstring | undefinedOptional description value accepted by this exported component.
TidalVerificationCode.errorstring | undefinedOptional error value accepted by this exported component.
TidalVerificationCode.formatCount((filled: number, total: number) => string) | undefinedOptional format count value accepted by this exported component.
TidalVerificationCode.lengthnumber | undefinedOptional length value accepted by this exported component.
TidalVerificationCode.onComplete((value: string) => void) | undefinedCallback invoked when the complete interaction is proposed.
TidalVerificationCode.rootClassNamestring | undefinedOptional root class name value accepted by this exported component.
Complete usage
Full example, stylesheet imports, API and accessibility documentation
Gotchas
- Keep field state, validation results, submission, and persistence in the host form workflow.