Read Article

Back to Blog Archives
Claude 3.5 Sonnet Artifacts Guide

How to Use Claude 3.5 Sonnet Artifacts to Build Interactive Tools and Prototypes Without Coding

When OpenAI launched ChatGPT, it felt like magic: you could ask a machine a question, and it would return a fully structured essay, translation, or block of code. But as the initial novelty wore off, a common pain point emerged. If you asked the AI to write a webpage, a calculator, or a dashboard, you would receive a wall of raw code. To actually use it, you had to copy it, open a text editor, save it as an HTML file, and run it in a browser. For non-technical users, this friction was often a barrier to entry.

Anthropic solved this problem with the release of Claude 3.5 Sonnet and its revolutionary feature: Artifacts. Instead of just outputting lines of code, Claude now compiles, executes, and renders interactive web pages, animations, utility tools, and games directly in a side panel next to your chat. You can click, drag, slide, and test the application in real-time, and iterate on its design simply by talking to Claude.

In this guide, we walk you through how to activate Artifacts and provide exact prompt templates to build custom calculators, functional dashboards, and interactive prototypes without writing a single line of code.

1. Understanding and Activating Artifacts

An "Artifact" is a self-contained content piece that Claude generates when it recognizes you want a substantial piece of code, design asset, or structured documentation that is meant to be viewed or utilized outside the chat flow. These include:

  • HTML Webpages & Interactive Prototypes
  • CSS Stylesheets and SVG Graphic drawings
  • React components (using Tailwind CSS and Lucide icons libraries)
  • Comprehensive Markdown guides, checklists, or data tables

To use this feature, ensure that "Artifacts" is toggled ON in your Anthropic user settings. Once enabled, Claude will automatically open the side window whenever you ask it to create interactive components.

2. Walkthrough: Building a Custom Pricing/ROI Calculator

Interactive calculators are incredible lead magnets for websites, but custom programming can cost thousands. With Claude, you can build a responsive, styled pricing calculator in under five minutes.

The Pricing Calculator Prompt

Use the following prompt format to construct a fully functioning slider-based calculator:

Interactive Calculator PromptText
Act as a senior front-end developer and designer. Create a fully functional, single-file HTML/CSS/JS web application that works as an interactive pricing calculator for a SaaS tool.

Functional requirements:
- Sliders for: "Number of Active Users" (1 to 1000) and "Monthly Email Volume" (5000 to 500,000).
- Dropdown selector for subscription tier: "Basic" ($0.05 per user), "Growth" ($0.08 per user), and "Enterprise" ($0.12 per user).
- A toggle button for "Annual Billing" (applies a 20% discount to the final price).
- Dynamic calculations displaying: "Estimated Monthly Price" and "Estimated Annual Savings".
- Real-time updates (no submit button needed, calculations update instantly on slider move).

Design requirements:
- Use a stunning dark mode theme with glassmorphic cards (semi-transparent dark background, thin border, glowing shadows).
- Neon accents (electric blue and bright purple).
- Clean, modern typography (sans-serif, responsive sizes).
- Fully responsive layout that looks great on mobile and desktop.

Once Claude outputs the first version, you can simply type edits like: "Add an interactive bar chart displaying the price breakdown by user costs vs. email volume," or "Add an export button that lets users download their configuration as a PDF." Claude will immediately compile the new code and update the interactive preview.

3. Creating a Dynamic Admin Dashboard

Dashboards are notoriously complex because they require coordinating tables, filters, search bars, and charts. Claude 3.5 Sonnet handles this complexity with ease, generating clean mock data and styling it beautifully.

The SaaS Dashboard Prompt

Copy and paste this prompt to generate a rich analytics dashboard mockup:

Analytics Dashboard PromptText
Create an interactive HTML dashboard for a small business owner to track sales and client leads. 

Include these functional features:
1. Three Top KPI Cards showing: "Total Revenue" ($24,500), "Conversion Rate" (3.2%), and "Active Leads" (120). Add subtle hover micro-animations to these cards.
2. A searchable, sortable data table showing client leads (columns: Name, Source, Deal Size, Status). Include at least 8 rows of realistic mock data.
3. A dropdown filter to filter the table by "Status" (e.g., New, In Progress, Closed-Won, Closed-Lost).
4. A button labeled "Export to CSV" that actually compiles the filtered table rows and downloads them as a CSV file when clicked.
5. Use Vanilla JS for the interactivity (no external react dependencies). Use inline CSS for styling. Set a gorgeous modern aesthetic: dark theme with slate gray surfaces, emerald green accents, and white text.

4. Claude Artifacts Capability Summary

To help you choose the right prompt approach, review this overview of Claude's artifact generation strengths:

Tool Type Artifact Output Key Interactive Elements Best Prompt Focus
CalculatorsHTML / JS (Single File)Range sliders, toggles, custom selectors, graphs.Define variables, boundaries, discounts, and logic formulas.
DashboardsHTML / CSS / JS / SVGSearch bars, category filters, CSV downloads, sortable headers.Describe mock dataset, visual design system, and filtering rules.
Utility AppsHTML5 LocalStorage AppAdd/remove items, progress bars, localStorage save/load.Specify persistent storage rules, checklist features, and step resets.
Simple GamesHTML Canvas / SVG JSKeyboard arrow listeners, score trackers, start/reset loops.Define game loops, hit-box boundaries, physics speed, and restart button.

5. How to Deploy and Host Your New Artifact

Once you are thrilled with the application Claude has built in the preview window, you will want to take it live. Follow these simple steps to deploy your tool to the web:

  1. Download the code: Click the "Download" or "Code" button in the bottom corner of the Claude Artifact panel. Save it as an `index.html` file on your computer.
  2. Test it locally: Double-click the saved `index.html` file to open it in your web browser. Test the sliders, buttons, and responsive sizing to ensure everything works offline.
  3. Publish to the web (Free options):
    • Netlify Drop: Drag and drop your `index.html` file onto the Netlify Drop page. Within 10 seconds, it will generate a live, shareable URL.
    • GitHub Pages: If you are familiar with Git, create a free public repository, upload your file, and enable GitHub Pages in settings to host it for free.
  4. Embed on your website: Upload the file to your website's server and embed it inside any page using an iframe:
    <iframe src="your-calculator.html" width="100%" height="600" style="border:none;"></iframe>

Conclusion

Claude 3.5 Sonnet's Artifacts feature is a major leap forward in democratizing software development. It bridges the gap between coding skills and product ideas, allowing absolute beginners to construct interactive tools, custom dashboards, and functional mockups in minutes. By writing clear, descriptive prompts that outline variables and design constraints, you can bring your ideas to life instantly. Open Claude, paste a prompt, and start building your next digital tool today!