View as Markdown

API reference

@salmonui/inputs/otp-field

5 exported symbols: 1 component, 1 function, 2 interfaces and 1 type. Each name links its page with the signature, docs and members.

import { … } from '@salmonui/inputs/otp-field';

Components

  • OtpFieldOne-time code input: one native <input autocomplete="one-time-code"> with maxLength, drawn as cells from the value and the selection, so SMS autofill, paste an…

Functions

  • normalizeOtpKeeps the accepted characters, applies transform and cuts to length.

Interfaces

Types

  • OtpFieldLocaleTextUser-visible strings: incomplete ({0} the length) is the error while the code is partly filled.