TidalUI

Verification code preview

A six-digit code input with paste and validation.

pro · Forms · composite

When to use

Alternatives

Configure components.json and the @tidal-pro namespace before installing Pro components.

Installation

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

Import components/ui/tidal.css, components/ui/verification-code.css. Wrap installed components in tidal-scope.

Preview

Verification code component preview

Open interactive 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)
string

Required label value accepted by this exported component.

TidalVerificationCode.onValueChange (required)
(value: string) => void

Callback invoked when the value change interaction is proposed.

TidalVerificationCode.value (required)
string

Required value value accepted by this exported component.

TidalVerificationCode.description
string | undefined

Optional description value accepted by this exported component.

TidalVerificationCode.error
string | undefined

Optional error value accepted by this exported component.

TidalVerificationCode.formatCount
((filled: number, total: number) => string) | undefined

Optional format count value accepted by this exported component.

TidalVerificationCode.length
number | undefined

Optional length value accepted by this exported component.

TidalVerificationCode.onComplete
((value: string) => void) | undefined

Callback invoked when the complete interaction is proposed.

TidalVerificationCode.rootClassName
string | undefined

Optional root class name value accepted by this exported component.

Complete usage

Full example, stylesheet imports, API and accessibility documentation

Gotchas