StealThis .dev
Pages Medium

Dashboard — Mobile-first layout

A mobile-first finance dashboard framed inside a centered phone shell — sticky greeting bar, a gradient hero balance card with delta chip and inline-SVG sparkline, a horizontally swipeable row of snap-scrolling KPI chips, and stacked widget cards holding a mini line chart, a transactions list, and a budget donut. A fixed bottom tab bar swaps Home, Stats, Activity, and Profile views, while a refresh button and pull-down gesture re-roll the data with animated count-ups. Pure HTML, CSS, and vanilla JavaScript.

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

Code

Mobile-first layout

A phone-shaped dashboard for the fictional Lumen Finance app, designed thumb-first and then scaled up to a centered device frame on desktop. A sticky top bar carries the greeting, avatar, and a notification bell with an unread badge, while a refresh icon kicks off a spinner. Below it the hero card shows the total balance as a huge tabular figure with a green or red delta chip and a plain-language summary, backed by a translucent inline-SVG sparkline that bleeds to the card edges.

Under the hero, a horizontally scrolling rail of KPI chips snaps into place — income, savings, investments, credit score — each with its own colored mini sparkline and up/down delta. The stacked widget cards beneath cover the core chart types: a 7-day spending line chart with gridlines and an end-point dot, a recent-activity transaction list with category icons, and a budget-split donut drawn from stroke-dash math with a matching legend. The Stats and Activity tabs add a six-month cashflow bar chart, animated savings-goal bars, and a live-updating feed.

The fixed bottom tab bar swaps four full views (Home, Stats, Activity, Profile) and resets scroll on switch. Tapping the refresh button — or pulling the scroll view down past its top on touch — re-rolls every dataset and counts the numbers up to their new values, and a slow live tick nudges the balance so the screen feels alive. All targets meet the 44px touch minimum, controls are keyboard-operable with visible focus rings, landmark roles and aria labels are in place, and below 720px the phone frame expands to fill the viewport down to about 360px.