Ship-It Designv0.0.3
GitHub

OTP

Each example below is a real component instance — flip the theme toggle to see how it adapts.

Default#

Loading…

Four Digit#

Loading…

Props#

Props for OTP
PropTypeDefaultDescription
lengthnumber | undefined6Number of digit slots. Defaults to 6.
onComplete((code: string) => void) | undefinedCalled with the assembled string when every slot has a value.
onChange((value: string) => void) | undefinedCalled with the partial string on every change.
defaultValuestring | undefinedInitial value (string of digits).
ariaLabelstring | undefinedCodeAria label applied to each individual slot, suffixed with " {n} of {N}".
classNamestring | undefined
disabledboolean | undefined