Build a Weighted Pros and Cons Infographic with a Tipping Balance Scale
A single-file interactive infographic where importance sliders weight each pro and con and an SVG balance scale tips live to show a verdict.
The prompt
Act as a senior information designer who writes clean, dependency-free front-end code. Build Tipping Point, an interactive pros and cons infographic for one decision: should Maya accept a product lead job in Lisbon? List 4 pros and 4 cons, each with a short bold label, a one-line specific detail with real numbers, and an importance slider from 0 to 10 with a sensible default. In the center, draw an SVG balance scale. The pros pan hangs on the left and the cons pan on the right, each showing its total and small stacked weight blocks. The beam tips live as sliders move. Rules: 1) Use native range inputs so mouse, touch and arrow keys all work, with visible focus rings and aria-valuetext. 2) Tilt angle is the score gap divided by total weight, capped at 22 degrees. Ease the motion, but snap instantly under prefers-reduced-motion. 3) Show a verdict chip (Too close to call, Leaning yes or no, Clear yes or no), a one-line explanation and the single heaviest factor, announced through aria-live. 4) Add Reset weights and Weigh everything equally buttons. 5) Use a warm off-white background, green for pros, brick red for cons and brass for the scale. Use three columns on desktop and stack them with the scale on top below 920px. 6) Use no external files, 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
- Native range inputs give touch, mouse and keyboard support plus accessibility for free, so the sliders work everywhere on the first try.
- Scaling tilt by gap ÷ total weight with a 22° cap keeps the scale readable and stops pans from flying off the canvas.
- Equal default totals make the scale start level, which invites users to drag right away and see the tool's point.
Paste into ChatGPT, Claude or Gemini. Save the returned code as tipping-point.html and open it in any browser, or view it in the chat's canvas or preview. To reuse it, swap the question and the eight reasons for your own decision.
Common edits
- Replace the Lisbon question and the eight reasons with your own decision, such as choosing a laptop, a vendor or a four-day week.
- Add a soft Web Audio click on slider change with a mute toggle, or raise the item count to 6 per side.
Prompt details
- By
- Prompts-GPT editors
- Published
Did this prompt work?
Keep exploring
More like this
Build a 100-Person Icon Array Demographic Infographic in One HTML File
You get a single HTML file that shows a fictional town as 100 SVG person icons, with tabs for commute, age and housing and an interactive legend that highlights each group.
Build a 12-Week Fitness Progress Tracker Infographic in a Single HTML File
Generates a one-page fitness report with bodyweight and lift line charts, personal-record badges, a streak calendar and an instant kg/lb toggle, all from built-in sample data.
Build a Before-and-After Statistics Infographic With Color-Coded Change Arrows
A single HTML infographic comparing two years across nine metrics, showing old and new values, absolute and percent change, and arrows colored by whether up is good.
Build a Budget Allocation Treemap Infographic in a Single HTML File
You get one HTML file that draws a squarified treemap of a city budget, hides labels on small blocks, and shows a details panel when you tap or click any block.
Build a Classroom Grade Distribution Infographic with Histogram and Quartiles
A single HTML file that turns an inline array of class scores into a histogram with mean and median markers, a box plot, stat cards and a plain-language summary.
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.