Build an Interactive Team Org Chart One-Pager with Contact Cards in HTML
Get a single HTML file with an expandable SVG org chart, department color coding, clickable contact cards and a search box that highlights matching people.
You getone complete HTML file in a single code block, then 3 short ideas to extend it.
The prompt
You are a senior front-end developer and information designer. Build "Fernhill Studio Team Map", a one-page org chart for a fictional 19-person product studio, as a single self-contained HTML file. Show the team as an expandable SVG tree with the CEO at the top, four department heads below, then their reports, joined by elbow connector lines for reporting lines. Each node shows an initials avatar, name and role, color-coded by department: Leadership, Product, Engineering, Design, Operations.
Rules:
1. Clicking a node, or pressing Enter on it, opens a contact card panel with email, phone, location, reports-to, direct reports and an Ask me about line. Names in the card are buttons that navigate to that person.
2. Nodes with reports get a round toggle showing a minus sign, or plus and the hidden headcount. Add Expand all and Collapse all buttons, and start with two teams collapsed.
3. A search box matches name, role, department or city. Matches get a warm highlight and the rest dim. Collapsed branches open, and a live status line counts the matches. Enter jumps to the first match and Escape clears.
4. Use an indented tree that fits 360 to 1280px. Put the card beside the chart on wide screens and below it on narrow ones. Truncate long text cleanly.
5. Use a warm off-white page, five muted department colors, a header with headcount stats and a color legend. Use no external assets, storage or network.
6. Make every control keyboard-focusable with visible focus rings, and respect prefers-reduced-motion.
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
- An indented tree layout avoids wide top-down charts that break on phones, so the chart fits any width from 360 to 1280px.
- Giving a fixed fictional roster, departments and colors means the model writes real sample data instead of placeholders.
- Spelling out the search behavior (highlight, dim, auto-expand, live count) gets a filter that actually helps you find people.
Paste into ChatGPT, Claude or Gemini. Save the code as team-map.html and open it in a browser, or use the chat's preview or canvas. To use your own team, ask the model to swap in your names and roles.
Common edits
- Replace the roster with your own team, keeping the same fields: name, manager, role, department, city and topics people can be asked about.
- Change the department colors or add a sixth department, then ask for a print stylesheet that expands every team before printing.
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 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.
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 Gantt-Style Project Timeline Infographic with Milestones in Pure SVG
A single HTML file that draws a project Gantt chart in pure SVG, with progress bars, dependency arrows, milestone diamonds, a Today marker and hover tooltips.
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.