StealThis .dev

Upsell — Upgrade modal (plan compare)

A self-contained upsell flow for the fictional Northwind SaaS. A billing settings card shows the current Starter plan with usage bars nudging against their caps, and an Upgrade button opens an accessible modal dialog that places Starter beside the recommended Pro tier. Newly unlocked features are highlighted, a monthly versus annual toggle swaps every price live, and a price-delta bar tallies the extra cost and new total. The confirm button runs a processing then success state before the dialog gracefully closes.

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

Code

Upgrade modal (plan compare)

A complete in-product upsell for the fictional Northwind SaaS, art-directed in the neutral product palette with an indigo brand and a teal accent. A billing settings card frames the moment: the workspace is on Starter, usage bars for projects, seats, and API calls press against their caps (the seat row tinted amber), and a short nudge explains why Pro is the right move. An “Upgrade plan” button opens the dialog.

The modal (role="dialog", aria-modal, labelled and described, focus trap, Esc and overlay-click to close) places the current Starter plan side by side with the recommended Pro tier, joined by an arrow connector. Pro’s rows are highlighted as newly unlocked with +40, +15, and New badges, while Starter’s locked features are dimmed. A Monthly/Annual segmented toggle swaps every price live and a “Save 20%” badge marks the annual option; a live price-delta bar tallies how much more Pro costs and the new total, both recomputed on each cycle change.

Confirming runs a realistic flow — the button shows a spinner and “Processing…”, then settles into a green “Upgraded to Pro” success state, updates the underlying settings card to Pro, fires a toast, and gently closes the dialog. Everything is vanilla HTML, CSS, and JS with inline SVG icons — no frameworks, no build step, and no network requests beyond the Inter web font. A prefers-reduced-motion block neutralizes the open/close and spinner animations, and the compare columns stack into a single column below 520px.

Illustrative UI only — the brand, plans, prices, and usage numbers are fictional; not a real product.