StealThis .dev
Pages Hard

Banking — Investing

A trust-first fintech investing screen rendered in pure HTML, CSS and vanilla JavaScript. It pairs a headline portfolio value with day gain or loss, an interactive SVG performance chart with timeframe tabs and hover scrubbing, a holdings table, an allocation donut with legend, and a buy or sell trade panel that opens a confirmation modal. Clicking any holding reveals a detail sheet with cost basis and total gain. Tabular figures, masked security cues and toast feedback complete the experience.

Open in Lab
html css vanilla-js
Targets: JS HTML

Code

Investing

A self-contained investing dashboard for a fictional brokerage, “Northbank Invest.” The hero card leads with the total portfolio value, a colored day gain/loss pill, and the available buying power, all set in tabular figures so columns of money stay aligned. Below it, a timeframe tab strip (1D through ALL) redraws a smooth SVG area chart; moving the pointer across the chart scrubs a tooltip and dot to the nearest data point, and the line turns red when a range closes down.

The holdings table lists five positions with ticker badges, share counts, market value, and today’s percentage change. Selecting a row — by click or keyboard — opens a detail modal showing market value, average cost, last price, and total gain. On the right, an allocation donut and legend break the portfolio down by holding, and a trade panel lets you switch between buy and sell, pick an asset, enter shares, and preview the estimated cost or proceeds in real time.

Submitting a trade opens a confirmation modal with an itemized fee breakdown; placing the order mutates the underlying portfolio, adjusts buying power, and re-renders the table, summary, donut, and chart together, then fires a toast. Guardrails reject oversized buys against buying power and sells beyond the held quantity, and a lock control reinforces the 2FA security cue. Everything is keyboard-usable and reflows cleanly down to a 360px mobile viewport.

Illustrative UI only — not real banking software or financial advice.