Docplanner Logo

Docplanner Mobile UI

Edit page
Introduction
⚙️ – Core
⚛️ – Atoms-Molecules
AvatarBadgeButtonCheckBoxFieldCircleDividerDownloadCardIconInputFieldInputFieldButtonLinkListItemOneTimeCodeInputPropertiesRef methodsBasic usagePhotoAvatarRadioGroupFieldRatingSelectFieldSimpleAvatarSpacerSwitchFieldTextToast❌ Icon (Deprecated)❌ Roboto (Deprecated)❌ WorkSans (Deprecated)
🧬 – Organisms

OneTimeCodeInput

This input has everything you need to handle a scenario where you need a confirmation code from a text message. It autosubmits the input once you fill in all the fields so no need for a submit button. It also shows one time code suggestion on iOS which means that completing the input takes just one click.

Properties

codeLength
number | undefined
4

Number of digits

onFilled
(value: string) => void
required

Callback fired when the last digit is filled

disabled
boolean | undefined

Determines whether the input is opaque

Ref methods

In order to make its functionality complete, it offers two methods attached to its ref attribute.

  • clear
  • focus

They are especially useful for error handling. See an example below for more information.

Basic usage