Verified against Claude · 2026-07-21
Build a multi-view dashboard as one self-contained Claude Artifact
A prompt for building a single-file interactive dashboard Artifact with multiple tabs sharing one dataset and one state model, so filters and selections stay consistent across views instead of several disconnected mini-tools bolted together.
The prompt
Ready to copy — highlighted parts are example details you can swap.
Build this as a single self-contained Artifact — one React component, no external libraries beyond what the Artifact environment already provides, no network calls, no separate files. Everything below must live inside one component with shared state, not several Artifacts stitched together afterward. DASHBOARD PURPOSE An internal dashboard for reviewing this month's support ticket volume by category and by agent, so the team lead can spot a category spike or an overloaded agent at a glance. DATA SOURCE A CSV of 340 tickets with columns: ticket_id, category, agent, opened_at, resolved_at, priority — pasted in full below the prompt. Treat this as the single source of truth for every view below — do not invent additional rows, categories, or values not present in it, and if the data is ambiguous in a way that would change a chart's meaning, say so before rendering rather than guessing silently. If the dataset includes a column whose meaning is not obvious from its header alone, state your interpretation of what it represents before using it in any view, so a wrong assumption is visible rather than baked silently into a chart. VIEWS Build these as switchable tabs or sections within the one component, sharing the same underlying data and any filters the user sets: Tab 1: ticket volume by category (bar chart) with a date-range filter. Tab 2: average resolution time by agent (table, sortable). Tab 3: open vs resolved ratio over the selected date range (line chart). STATE MODEL Hold filters, selections, and the active view in one top-level state object, not scattered per-tab local state — this is what makes cross-view consistency mechanically enforceable rather than something to remember to keep in sync by hand. SHARED INTERACTIONS The date-range filter set in Tab 1 must also apply to Tab 2 and Tab 3 — selecting 'last 7 days' should filter all three views to the same window, not just the one currently visible. A filter or selection made in one view must be reflected consistently if the same dimension appears in another view — do not let two tabs silently show different filtered subsets of the same data without indicating that a filter is active. EDGE CASES TO HANDLE EXPLICITLY An agent with zero tickets in the selected range, a category with only one ticket (can't show a meaningful average), and a date range with no tickets at all. For any of these you decide not to handle, say so in your closing note rather than letting it fail silently at runtime. REQUIREMENTS - Switching between views must be instant with no reload or recomputation flash — hold shared state in the component, do not refetch or reconstruct it per tab. - Every chart or table must degrade gracefully with zero, one, or a handful of data points — no chart library error, no divide-by-zero, no empty white box with no explanation. - Design for a narrow side-panel width first, not a full desktop screen — tabs should stack or scroll horizontally rather than get cut off, and any table must scroll inside its own container rather than forcing the whole panel to scroll sideways. - Every interactive control (tab, filter, toggle) must be reachable and legible without relying on hover alone, since a side panel is often viewed on a laptop trackpad, not a mouse with reliable hover states. - Do not add a view, filter, or metric beyond what is specified above, even a good one — a dashboard with one purpose is easier to trust than one that quietly grew a second job. - Use color purposefully, not decoratively — if two categories need to be visually distinguished, the color choice should carry that meaning, not just fill space. AFTER BUILDING State in two or three sentences: which edge case, if any, from the list above you decided not to handle and why, and whether any part of the data source required an assumption you made on the user's behalf rather than something stated outright.
Customize
Optional — swap in your own details for the highlighted parts above.
Why this works
Artifacts render as one live component, and the biggest practical failure mode of a plain 'build a dashboard' ask is that each view gets built as if it were independent, so state — filters, the active selection — does not actually propagate between tabs; naming a single shared state model up front, rather than after noticing the bug, is the fix, because Claude will default to the path of least resistance (per-tab local state) unless told the cross-view consistency is itself a requirement, not just a nice side effect that will happen automatically. Treating the pasted data as the single source of truth and forbidding invented rows or categories addresses the fact that a chart-generation task gives the model room to fill a visually convincing gap with a plausible-looking value when the real data is thin or ambiguous — an instruction to flag ambiguity before rendering converts a silent guess into a visible caveat, and the column-meaning check specifically targets spreadsheet-shaped data whose header alone does not fully specify what it holds. Requiring graceful degradation for zero, one, or a handful of data points targets the actual crash surface of chart-heavy Artifacts: most charting code paths are only exercised against the happy-path data shape implied by the prompt's own example, and a real dataset will eventually hand the dashboard an edge case — a category with exactly one ticket, an agent with none in range — that the naive implementation was never checked against, producing a divide-by-zero or a blank chart with no explanation instead of a clearly stated 'not enough data.' Narrow-first responsive design matters specifically because Artifacts render in a side panel, not a full browser tab — a dashboard designed and mentally tested at desktop width will silently clip content or force sideways scrolling the moment it is actually used in its native rendering surface, which is exactly the surface this prompt is being built for and the one a generic 'make it responsive' instruction, without naming the panel as the real target, would not reliably produce.
What you get back
A three-tab dashboard where a date-range slider in the header updates all three charts simultaneously; the resolution-time table shows "—" with a tooltip for any agent with zero tickets in range rather than NaN, and the closing note states: "Not handled: a selected range spanning a category with only one ticket still shows a single-point average with no confidence caveat — flagging rather than fixing, since a caveat would need more screen space than this panel width allows."
Verified against
Claude Sonnet 4.6 (Artifacts) · 2026-07-21
Changelog
- 2026-07-21 — Initial publish, verified against Claude Sonnet 4.6 Artifacts.
Building this for real?
This is a free starting point. If you'd rather have what Scult builds built and running for your business, that's Scult's day job.
EXPLORE WHAT SCULT BUILDS
