Docs
Passcode Card

Passcode Card


The PasscodeCard component provides an interactive passcode entry interface where users can input a passcode of customizable length. This component is ideal for scenarios where a secure passcode entry is required, such as for authentication or restricted access features.

Enter Passcode

Enter your 6-digit passcode

Installation


npx empire@latest add passcode-card

Props


Prop nameTypeDescription
correctPasscodestringThe correct passcode that will be verified.
lengthnumberThe number of digits in the passcode input.

Interactions

  • When a user enters an incorrect passcode, the card shakes to indicate failure, and the input is cleared after a brief delay.
  • On entering the correct passcode, a success message appears.
  • Users can reset the input using the "Reset" button.