🎮ArcadeLab
🔬~8 min from prompt to published URL

How do I prompt Claude or ChatGPT to make an interactive visualization?

Interactive visualizations and explorables are a renaissance shape of web content — Bret Victor explorables, Nicky Case explainers, Distill.pub articles, science demos. AI assistants are remarkably good at producing these when prompted well. The prompt below asks for one, with an option to use D3 if the visualization needs charting.

Build a single-file HTML interactive visualization in the spirit of Distill.pub explorables and Bret Victor explainers — interactive, educational, visually beautiful.

Use the 2D canvas API or D3.js (or both). If using D3, add "libraries: d3" to the header (don't include the D3 CDN script — ArcadeLab loads it).

Requirements:
- All JavaScript and CSS inline; no external files
- File under 500KB
- Works at any viewport size (responsive)
- No network calls — embed any data inline as JavaScript constants or generate procedurally
- Polished visual design: thoughtful color palette, clear typography, smooth animations
- The interaction should reveal something the static image can't

Add this ARCADELAB header at the very top:

<!--ARCADELAB
title: [Your Visualization Title]
description: [One short sentence about what it shows]
libraries: [omit, or "d3" if you're using D3]
emoji: [📊 🔬 ⚛️ 🌌 🧬 or similar]
color: [color matching your viz: blue, purple, teal, gold...]
-->

The visualization should illustrate: [DESCRIBE THE CONCEPT — what idea, what controls, what should the viewer come away understanding?]

For inspiration on quality bar, look at: https://arcadelab.ai/play/light-wave-or-particle-ultraviper34 (an interactive double-slit experiment, single HTML file, no frameworks).

Output the complete HTML file. After, tell me: "Copy the code, then go to arcadelab.ai/publish and paste it."

Notes: Best for: physics simulations, math toys, biology models, data visualizations, animated explainers. Reference our double-slit experiment demo (arcadelab.ai/play/light-wave-or-particle-ultraviper34) as a quality bar — that level of polish is achievable with the right prompt.

Ready to publish? Paste your HTML file and get a URL.

🚀Publish your thing

Other prompts