Superui logo

SuperUI

alpha

DocsCommunityMy components
DocsCommunityMy components

Pin Code

Pin Code Input

import { PinCode } from "@superui/styles";

Basic Usage

import { PinCode } from "@superui/styles";

export function PinCodeDemo() {
  function handleSubmit(values: string[]) {
    alert(values.join(""));
  }

  return <PinCode length={4} onComplete={handleSubmit} autoSend />;
}

Props

NameTypeDefaultDescription
variantStringprimarySelect variant colors of the input.
sizeStringmediumSelect the size of the input.
disabledBooleanfalseDisable the input.
onChangeFunction-Callback function when the input value changes.
onCompleteFunction-Callback function when the input is completed. (Needs autoSend true)
autoSendBooleanfalseSend the input value when the user fills the last input.
valuesArray-Array of values to be displayed in the input.