zalify-ui

Pin Input

A form input component for entering PIN codes and verification codes.

React

Usage

Info

If you prefer a closed component composition, check out the snippet below.

Examples

Sizes

Pass the size prop to change the size of the pin input component.

React

Variants

Pass the variant prop to change the visual style of the pin input component.

React

One time code

Pass the otp prop to make the pin input component behave like a one-time code input. This helps improve the user experience when entering OTP codes.

React

Mask

Pass the mask prop to obscure the entered pin code.

React

Placeholder

Pass the placeholder prop to add a placeholder to the pin input.

React

Field

Here's an example of how to compose the Field and the PinInput components.

Enter the 4-digit pin sent to your email address.

React

Controlled

Pass the value and onValueChange props to to control the value of the pin input.

React

Alphanumeric

Pass the type prop to allow the user to enter alphanumeric characters.

React

Closed Component

Here's how to setup the Pin input for a closed component composition.

And use it like this:

Props

Root

Input