Build a Monthly KPI Dashboard One-Pager with RAG Status and Sparklines in HTML
A single HTML file that shows six business KPIs as cards with targets, red/amber/green status, SVG sparklines, a month stepper and editable one-line commentary.
You getone complete HTML file in a single code block, then 3 short ideas to extend it.
The prompt
Act as a senior product designer who writes clean, dependency-free front-end code. Build a one-page monthly KPI dashboard called "Harbor & Pine Roasters · Monthly Performance Review" for a small specialty coffee roaster. It shows six metrics: revenue, gross margin, new customers, subscriber churn, Net Promoter Score and average order value. Embed 12 months of realistic sample data (Apr 2024 to Mar 2025), with a monthly target and a higher-is-better or lower-is-better direction for each metric.
Rules:
1. Each card shows the metric label, the current value, the target, and the change versus last month. Color the change by good or bad, not by up or down. Each card also has a red/amber/green status badge, an inline SVG sparkline with a dashed target line and a dot on the selected month, and a one-line commentary slot.
2. Status logic: green meets the target, amber is within 5% of it, red is more than 5% away. Pair every color with a symbol and a text label.
3. A month stepper (buttons plus the left and right arrow keys) recalculates every card. Chips showing status counts filter the cards by dimming the others.
4. Commentary is editable in place with contenteditable. Generate it from the data, with hand-written notes for the latest month.
5. Use a responsive grid: 3 columns on desktop, 2 on tablet, 1 on phones. Use a warm off-white background, navy ink and a serif headline, and respect prefers-reduced-motion.
6. Use no external libraries, fonts, storage or network calls.
Output format: one complete HTML file in a single code block, then 3 short ideas to extend it.Example output
Tips and common edits
Why this works
- Fixed metrics, sample data and threshold rules leave the model nothing to guess, so the cards and statuses compute correctly first time.
- Rating each change as good or bad, not just up or down, makes lower-is-better metrics like churn read correctly at a glance.
- Inline SVG sparklines and contenteditable notes keep it to one offline file, with no chart library or form needed.
Paste the prompt into ChatGPT, Claude or Gemini. Save the returned code as kpi-review.html and open it in any browser, or view it in the chat's preview or canvas. Then swap in your own numbers and notes.
Common edits
- Swap the company name, the six metrics, the targets and the 12 data points for your own business, and tune the amber band (e.g. 10%).
- Add a print stylesheet or a quarter view that averages three months per card.
Prompt details
- By
- Prompts-GPT editors
- Published
Did this prompt work?
Keep exploring
More like this
Build a Year-over-Year Growth Infographic with Animated Counters and Sparklines
A single HTML file KPI infographic where year-over-year numbers count up once on view, each metric carries an inline SVG sparkline, and reduced-motion users see static final values.
Build a Company Fact Sheet One-Pager with Animated Stats and a Location Map
You get a single HTML file laid out like an investor or press fact sheet, with animated stat counters, mission, leadership, milestones, an interactive SVG office map and a brand-color theme switch.
Build a Creator Media Kit One-Pager With Audience Stats in HTML
A pitch-ready creator media kit page with animated follower counts, platform tabs, audience demographic bars, engagement benchmarks and a clickable package quote builder.
Build a Nonprofit Annual Impact Report One-Pager with Animated Counters
A donor-friendly impact report page in one HTML file, with count-up impact stats, an interactive where-each-dollar-goes donut, outcome bars, a beneficiary story and a gift-impact picker.
Build a Private Net Worth Snapshot Infographic in a Single HTML File
A one-page personal balance sheet with editable assets and debts, stacked balance bars, payoff progress rings and live totals that run fully offline.
Build an Editable Monthly Budget Snapshot One-Pager in a Single HTML File
A one-page personal budget snapshot with editable income and spending figures that instantly update a donut chart, savings-rate meter and over-budget flags, and that prints cleanly.