A banking app login screen built with Bootstrap 6: a 6-digit PIN keypad with dot indicators, a simulated Face ID and fingerprint sign-in, a forgot PIN sheet and a profile switcher. This HTML mobile template works as a PIN code login UI for mobile banking sites and PWAs, and it can be packaged as a native app with Capacitor.
How it works
The root .bkl-app is a 430 px app column. The account button (.bkl-account) opens a profile sheet. Below it, .bkl-entry holds the title, six .bkl-dot indicators and the .bkl-msg status line, and the .bkl-keypad grid holds the digits, a biometric key (.bkl-key-bio) and a delete key.
script.js takes digits from the keypad or a physical keyboard. After six digits it compares the PIN with data-demo-pin (135790). A wrong PIN shakes the dots and shows the attempts left; after three tries the keypad locks for 30 seconds while biometrics and reset still work. Success opens a signed-in state with a time-of-day greeting. The "last sign-in" date is computed from today, without a year.
The profile, biometric and help sheets are Bootstrap 6 Drawers (<dialog class="drawer drawer-bottom">). The biometric sheet runs a simulated scan, then signs the user in; "Use fingerprint instead" switches the mode and icons.
Customization
--bkl-tealon.bkl-app: the brand colour of the logo, filled dots, biometric key and buttons; the--bs-primary-*overrides keepbtn-solid theme-primaryin sync.data-demo-pinon.bkl-app: the demo PIN. Replace the check inverify()with a call to your authentication API.MAX_ATTEMPTSandLOCK_SECONDSinscript.js: how many tries are allowed and how long the lockout lasts.startScan()inscript.js: replace the timeout with a WebAuthn request or a Capacitor biometric plugin.- Add profiles by copying a
.bkl-profilebutton withdata-name,data-first,data-initialsanddata-meta. - Edit the
helpTextobject to change the messages of the help options. - Remove
.bkl-demobefore going live.
Use cases
- Mobile banking apps: quick PIN or Face ID unlock after the first login.
- Credit union and neobank PWAs: switch between personal and business profiles.
- Wallet and budgeting apps: passcode lock screen with fingerprint unlock.
- Insurance or brokerage apps: a second step after password sign-in.
Accessibility
The keypad is a labelled group of real buttons, at least 44 px tall; icon keys have aria-labels. The dot row reports the digit count in its aria-label, and .bkl-msg is a polite live region. Sheets are native dialogs that close with Escape or a backdrop tap, and aria-expanded on their triggers stays in sync. Profiles use role="radio" with aria-checked. Animations stop for reduced motion.
Bootstrap 6 notes
Built on Bootstrap 6.0.0-alpha.1 (alpha APIs can still change). The sheets use the new Drawer instead of the Bootstrap 5 Offcanvas, closed with data-bs-dismiss="drawer", and Drawer is imported from the bundle as an ES module. Buttons use btn-solid, btn-outline and btn-text with theme-primary.