Hygge-UI

Pin Input

Used to capture a pin code or otp from the user.

Source

Examples

Sizes

Use the size prop to change the size of the pin input.

The pin input sizes are mapped to the Input component sizes.

One time code

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

Mask

Pass the mask prop to the PinInput component to obscure the entered pin code.

Placeholder

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

Field

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

Alphanumeric

Pass the type prop to the PinInput component to allow the user to enter alphanumeric characters. Values can be either alphanumeric, numeric, or alphabetic.