You Might Also Like
Mobile Banking Screen — Free HTML CSS JS Snippet
Mobile Banking Screen · Mobile · Plain HTML, CSS & JS · Live preview
What's included
Features
About this UI Snippet
Mobile Banking Screen — Account Dashboard UI

A banking home screen has to make one number the hero — the balance — then surround it with quick actions and a readable transaction history. This snippet builds a complete, interactive one inside a CSS phone frame: a gradient balance card styled like a physical card, a privacy toggle that hides every monetary amount at once, an action grid with tap feedback, and a color-coded transaction list — in HTML, CSS, and vanilla JavaScript with no dependency.
The balance card as a physical card
The balance sits on a gradient card with a large faded circle bleeding off the corner (a pure-CSS ::after pseudo-element) and a masked card number with a VISA brand mark, so it reads as an actual payment card rather than a plain panel. The layering uses position: relative with z-index so the content stays above the decorative circle.
A privacy toggle that hides real money
Tapping the eye button flips a hidden class on the balance and every .mbk-amt in the transaction list. Rather than replacing the text with dots — which would lose the value — the class sets the color to transparent and adds a soft text-shadow blur, so the digits become an unreadable smudge you can instantly reveal again. The incoming (green) and outgoing amounts get tinted blur shadows so the redaction still hints at the row's type. The eye glyph itself swaps to a "see-no-evil" icon while hidden.
The quick-action grid
Four actions — Send, Request, Transfer, Top up — are laid out as equal flex columns with rounded icon tiles in distinct accent colors. Tapping one runs a quick scale pulse via the Web Animations API (element.animate()), giving tactile feedback without permanently changing state, which is right for buttons that would navigate away in a real app.
The transaction list
Each row pairs a colored category icon with a merchant, a category-and-date subtitle, and a signed amount — green with a plus for income, dark for spending. Rows share hairline separators and flash on tap. This is the scannable ledger pattern every banking and wallet app uses.
Accessibility and performance
The privacy toggle, quick actions, and each transaction row are real buttons with aria-labels, so the whole screen can be operated from the keyboard and screen readers announce every control. One accessibility caveat worth handling when you adapt this: the hidden balance only blurs visually, so for assistive tech you should also swap the accessible text — for example set an aria-label like "balance hidden" on the balance element while it is redacted — so a screen reader does not still read the exact figure aloud. Performance is minimal: hiding amounts toggles a single class on a shared selector rather than rewriting any numbers, the pulse uses the Web Animations API which runs off the main layout, and the transaction list is static markup with no scroll listeners. Because the redaction keeps the real digits in the DOM and only changes how they paint, revealing is instant with no re-fetch or re-render. When you wire real data, format currency once and store the raw value separately so the visible and accessible representations can diverge cleanly.
Reusing it
Feed the balance and transactions from your API, wire the action buttons to their flows, and persist the hide-balance preference. Lift the content out of the phone frame for a responsive web dashboard, or keep it framed beside a wallet card to present a full finance app.
Build with AI
Build, Understand, Optimize, and Extend It With AI
You don't need to trace the redaction trick from memory to know it's clever. Paste this snippet's HTML, CSS, and JS into an AI coding assistant like Claude and ask it to explain exactly why the hidden class sets color to transparent plus a text-shadow blur instead of swapping the digits for dots, or how one class toggled on the balance and every mbk-amt element keeps all the figures in sync from a single click handler. The same assistant is useful for optimizing it — asking whether the transaction list should be rendered from a data array instead of hardcoded markup once real accounts are wired in, or how to keep the Web Animations API pulse from stacking up if a user taps an action rapidly. It's just as useful for extending the screen: ask it to add an aria-label swap so screen readers announce "balance hidden" rather than the real figure, wire the quick actions to real navigation, or persist the hide-balance preference across sessions. Treat the code less like a finished artifact and more like a starting point for a conversation.
Prompt to recreate it
Copy this into your AI assistant of choice to build the effect from scratch, or as a jumping-off point for your own variant:
Build a "mobile banking home screen" inside a CSS phone frame, in plain HTML, CSS, and vanilla JavaScript — no frameworks, no camera or real financial APIs.
Requirements:
- A phone-shaped outer frame (fixed width and height, rounded corners, dark bezel) containing a scrollable screen with a fake status bar (time plus a battery icon built from a bordered div and pseudo-element, no image).
- A gradient balance card styled to look like a physical payment card: a large faded decorative circle bleeding off one corner via a ::after pseudo-element positioned behind the content with a lower z-index, a masked card number, and a brand mark, with the balance itself displayed prominently.
- An eye-icon button that toggles a single "hidden" class shared by the balance element and every transaction amount element on the page. That class must not delete or replace the digit text — it must set the text color to transparent and apply a text-shadow blur so the real value stays in the DOM but reads as an unreadable smudge, instantly reversible by toggling the class again. Give income and expense amounts different tinted shadow colors while hidden so the row's type is still hinted.
- A row of four quick-action buttons (e.g. Send, Request, Transfer, Top up), each with a distinct accent-colored icon tile, where tapping any button plays a brief scale-up-then-back pulse using the element.animate Web Animations API method (not a CSS class toggle) as pure tap feedback with no state change.
- A transaction list where each row shows a colored category icon, a merchat name and category/date subtitle, and a right-aligned signed amount (green for incoming, dark for outgoing), with each row briefly flashing a background tint on click/tap.
- Every interactive element must be a real button with an appropriate aria-label so the whole screen is keyboard-operable and screen-reader friendly.Want to tighten it up first? Run this prompt through the AI Prompt Studio to score it across 8 quality dimensions, catch anti-patterns, and tune the wording for Claude, ChatGPT, or Gemini before you paste it in.
Step by step
How to Use
- 1Paste HTML, CSS, and JSA banking home screen renders with a gradient balance card, action grid, and transactions.
- 2Hide the balanceTap the eye icon and the balance plus every transaction amount blur into an unreadable smudge.
- 3Reveal it againTap once more and every figure snaps back; the eye glyph changes to reflect the state.
- 4Tap a quick actionSend, Request, Transfer, or Top up pulse with a scale animation on tap.
- 5Tap a transactionRows flash to acknowledge the tap.
- 6Bind your dataFeed the balance and transactions from your API and persist the privacy toggle.
Real-world uses
Common Use Cases
Got questions?
Frequently Asked Questions
Tapping the eye flips a hidden class on both the balance element and every element with the mbk-amt class in the transaction list. The class sets color to transparent and adds a soft text-shadow, turning the digits into a smudge. Because it targets a shared class, one tap redacts the whole screen and one more reveals it.
Replacing text with dots discards the real value, so you would need to re-render on reveal. The transparent-color-plus-blur approach keeps the true digits in the DOM and only changes how they render, which makes the reveal instant and avoids storing the value separately. Income and spending rows use tinted blur shadows so the row type is still hinted.
It uses a gradient background with a large faded circle created by an ::after pseudo-element that bleeds off the corner, plus a masked card number and a VISA brand mark. The content sits above the circle via position relative and z-index, giving the layered look of an actual payment card.
Each action button calls the Web Animations API — element.animate() with a short scale keyframe sequence — on tap. This gives tactile feedback without permanently changing any state, which suits buttons that would navigate to another flow in a real app rather than toggling something on the screen.
Render the transactions from an array and the balance from state. Track the hidden flag in state and bind the hidden class to it rather than toggling classList. Replace element.animate with a CSS transition keyed off a state flag if you prefer. Feed all figures from your API and persist the privacy preference. The CSS and Tailwind utilities port directly.