PIN Keypad Unlock

Enter your PIN

Use your 4-digit PIN to unlock your account.

Forgot your PIN? Reset it

About this block

PIN Keypad UnlockFREE

Full-height numeric keypad lock screen with PIN dots, a biometric shortcut, and a backspace key. Perfect for mobile app locks and quick re-authentication.

Auth30: PIN Keypad Unlock

Full-height numeric lock screen: a row of dots that fill in as digits are entered, a 3x3 numeric keypad with a biometric shortcut and backspace flanking the 0 key, and an optional forgot-PIN link underneath.

Free block

This block is free. No license or account is required: install it with the CLI and use it in unlimited projects.

Installation

Radix flavor

bash
npx shadcn add "https://ui.beste.co/r/auth30"

Base UI flavor

bash
npx shadcn add "https://ui.beste.co/r-base/auth30"

This installs the block to components/beste/block/auth30.tsx and its dependencies.

Quick start

The installed file exports auth30Demo alongside the block: the exact props behind the preview above. Spread it to get a working PIN lock screen in one line.

tsx
import { Auth30, auth30Demo } from "@/components/beste/block/auth30";

export default function UnlockPage() {
  return <Auth30 {...auth30Demo} />;
}

Then replace the demo with your own props. Written out, a trimmed setup looks like this:

tsx
import { Auth30 } from "@/components/beste/block/auth30";

export default function UnlockPage() {
  return (
    <Auth30
      heading="Enter your PIN"
      description="Use your 4-digit PIN to unlock your account."
      pinLength={4}
      labels={{ biometric: "Use biometrics", backspace: "Delete" }}
      forgotPrompt={{ text: "Forgot your PIN?", linkLabel: "Reset it", href: "/reset-pin" }}
    />
  );
}

Props

PropTypeDefaultDescription
headingstringScreen title
descriptionstringSubtext below the heading
pinLengthnumber4Number of dots and the digit cap for the entered PIN
labels{ biometric?: string; backspace?: string }{}aria-label text for the biometric and backspace buttons
forgotPrompt{ text: string; linkLabel: string; href: string }Line below the keypad, hidden entirely when not set
classNamestringExtra classes for the outer <section>

Behavior notes

  • The entered PIN is fully internal useState<string>; there is no onChange, onComplete, or any other callback prop, so the component never tells the outside world when the PIN reaches pinLength or what its value is. An integrator wiring this to real auth needs to fork the component to lift that state out.
  • Digits are capped at pinLength by append(), but reaching the cap does nothing on its own, no auto-submit, no visual "complete" state beyond all dots being filled.
  • The biometric button renders only when labels.biometric is set; it has an aria-label but no onClick handler at all, so it is purely decorative in the shipped code and needs to be wired up.
  • The backspace button is disabled whenever the PIN is empty; digit buttons themselves have no disabled state once the PIN is full, they simply stop appending because append() checks the length.
  • Digits 1-9 come from a mapped array in a grid-cols-3 layout; 0 is a separate hardcoded button placed in the bottom row between the biometric shortcut and backspace, matching a standard phone keypad arrangement.

More Auth blocks

View all Auth
FREE

auth38

Pattern Lock Unlock

Full-height pattern unlock screen with a tappable 3x3 dot grid that draws connecting lines as dots are selected, plus clear and unlock controls. Perfect for app lock screens and quick re-authentication.

PRO

auth21

Passkey Sign In

Full-height passwordless sign-in screen with a fingerprint icon, a continue-with-passkey button, and a password fallback below a divider. Perfect for WebAuthn and biometric authentication flows.

PRO

auth8

Welcome Back Unlock

Full-height re-authentication screen showing the signed-in user's avatar, name, and email with a single password field, a forgot-password link, and a use-a-different-account option. Perfect for session unlock and returning-user prompts.

PRO

auth23

Account Locked

Full-height lockout screen shown after too many failed attempts, with a live mm:ss countdown, a retry button that unlocks when the timer ends, and a reset-password link. Perfect for rate-limited sign-in protection.

PRO

auth46

Confirm It's You

Full-height step-up authentication screen that re-asks for the password before a sensitive action, showing the signed-in account and a cancel option. Perfect for protecting billing, security, and destructive actions.

FREE

auth5

Set New Password

Full-height reset-password screen with new and confirm password fields (each with a show/hide toggle) and a live requirements checklist that ticks off rules as the user types. Perfect for the final step of a password reset or invite flow.