How I use Claude Artifacts to prototype features in 20 minutes
← Back
April 4, 2026Claude6 min read

How I use Claude Artifacts to prototype features in 20 minutes

Published April 4, 20266 min read

Before I write a single line of production code for a new feature, I prototype it in Claude Artifacts. An Artifact is a self-contained React component or HTML page that Claude renders live inside the chat window. In twenty minutes I can see whether a UI idea actually works, share it with a designer or PM, and get feedback — without spinning up a dev environment or writing a component from scratch.

What Artifacts are good for

Artifacts shine for three things:

  • UI exploration: Drag-and-drop layouts, form flows, table designs — anything visual where you want to see it before you build it.
  • Algorithm visualisation: Animate a binary search, render a graph traversal, show how a rate-limiting token bucket fills and drains.
  • Data presentation prototypes: Feed in a sample JSON payload and ask Claude to build a dashboard component for it.

What they are not good for: anything that needs a backend, auth, real API calls, or persistent state across reloads. Artifacts run in a sandboxed iframe with no external network access.

The prompt structure that works

Vague prompts produce vague prototypes. I always give Claude three things:

  1. What the user is trying to do — the job-to-be-done, not the implementation
  2. The data shape — paste a sample payload or describe the fields
  3. Constraints — colour palette, component library, any behaviour requirements

A concrete example. Say I am building a task management feature. Here is the prompt I would use:

prompt
Build a React Artifact: a Kanban board for a task management app.

Data shape:
```json
{
  "columns": ["Todo", "In Progress", "Done"],
  "tasks": [
    { "id": "1", "title": "Design login screen", "column": "Done", "priority": "high" },
    { "id": "2", "title": "API integration", "column": "In Progress", "priority": "medium" },
    { "id": "3", "title": "Write unit tests", "column": "Todo", "priority": "low" }
  ]
}
```

Requirements:
- Drag tasks between columns (use HTML5 drag-and-drop, no external libs)
- Colour-code by priority: high=red, medium=amber, low=green
- Show task count badge on each column header
- Tailwind CSS for styling

That prompt takes two minutes to write and produces a working draggable Kanban board. Then I iterate.

The iteration loop

The power of Artifacts is the feedback loop. Once you have a prototype, you can refine it conversationally:

  • "Add a filter by priority dropdown above the columns"
  • "When I drag a task to Done, fade it out and add a checkmark"
  • "The column headers are too small on mobile — fix the responsive layout"

Each of these takes one message and a few seconds. The same iteration in a real codebase would mean file edits, hot reload, context-switching. In Artifacts you stay in flow.

Sharing prototypes with non-engineers

Claude.ai has a share button on Artifacts. I use this constantly for stakeholder review. Instead of scheduling a Figma walkthrough or building a demo environment, I paste a link and say "click around, this is roughly what the feature will look like." Designers catch layout issues. PMs catch missing states (empty state, error state, loading state). Engineers catch complexity that was not obvious from the spec.

The conversation that happens around the prototype is almost always more valuable than the prototype itself.

Algorithm visualisation prompts

This is my favourite use case. Complex algorithms are hard to explain in text. An animated visualisation makes them click instantly. A prompt format that works:

prompt
Build a React Artifact that visualises the sliding window algorithm.

Show an array of numbers as coloured boxes. The active window should be highlighted in blue. Add step-by-step controls (prev/next buttons and a play button that auto-steps every 500ms). Show the current window sum and maximum sum found so far. Use this example array: [2, 1, 5, 1, 3, 2] with window size 3.

Output: a self-contained interactive demo I can paste into a Notion doc, a PR description, or a team Slack channel. Junior engineers and interviewers alike get the algorithm immediately.

Extracting Artifact code into your codebase

When a prototype is approved, I ask Claude to clean it up for production:

prompt
The Artifact above is approved. Now refactor it for production:
1. Extract into separate files: KanbanBoard.tsx, KanbanColumn.tsx, KanbanCard.tsx
2. Replace the inline sample data with proper TypeScript types and props
3. Replace Tailwind class strings with a design-token-aware approach (use CSS variables where colour is semantic)
4. Add aria-label attributes for accessibility
5. Show the updated file structure and each file's content

Claude outputs production-ready components. I paste them in, wire up the real data layer, and the feature is 70% done before I have written any business logic.

The workflow in practice

My typical prototyping session:

  1. 10 min: Write the prompt with data shape and constraints. Get the initial Artifact.
  2. 5 min: Iterate — add missing states, fix layout, adjust colours.
  3. 2 min: Share the link with a designer or PM for async feedback.
  4. 3 min: Incorporate feedback, do a final cleanup pass.
  5. Next session: Ask Claude to extract the code into production files.

Total time from idea to stakeholder-reviewed prototype: twenty minutes. Total time from prototype to mergeable PR: an hour or two, depending on the data layer complexity.

The alternative — spec the feature in Figma, wait for design review, build from scratch, get feedback, iterate — takes days. Artifacts do not replace that process for complex features. But for the exploration phase, they compress a week of back-and-forth into an afternoon.

One thing to watch out for

Artifacts use React 18 with hooks but do not have access to your component library, design tokens, or custom hooks. The prototype will look slightly different from your production app. Be explicit with stakeholders that this is a sketch, not a pixel-perfect spec. The value is in the interaction model, not the visual polish.

With that caveat stated upfront, Artifacts have become the first step of my feature development process — not the last.

Share this
← All Posts6 min read