AI
Builder Hub
UI Design With Claude 3.5 Sonnet: Prompt Framework for Beautiful React UI Without Writing CSS From Scratch
UI/UX2026-03-137 min

UI Design With Claude 3.5 Sonnet: Prompt Framework for Beautiful React UI Without Writing CSS From Scratch

Claude Artifacts lets you create complete React components from a description. But 'create a beautiful landing page' gives generic results. This provides the prompt framework that helps Claude understand exactly what aesthetic you want.

UI Design With Claude 3.5 Sonnet: Prompt Framework for Beautiful React UI Without Writing CSS From Scratch

Claude Artifacts is a feature that lets Claude generate code and display a preview directly in the chat window. For React components, you describe a UI in natural language and Claude creates the complete component with styling — no project setup needed, no writing CSS from scratch.

But "create a beautiful landing page" gives generic boilerplate. Good prompts need to tell Claude the specific aesthetic, hierarchy, and interaction expectations.


📌 TL;DR

  • Claude Artifacts creates React components with live preview
  • Clear aesthetic description → good results; vague description → generic
  • Iterate through chat: one component, multiple refinements

Base Prompt Template: Single Component

Prompt
Please create a React component using Artifacts with these requirements:

COMPONENT: [Pricing card / Hero section / Sidebar navigation / ...]

AESTHETIC:
- Color palette: [dark navy + electric blue / warm cream + amber / ...]
- Style: [glassmorphism / minimalist / brutalist / neumorphism]
- Typography: [modern sans-serif, large headline with small body]

STRUCTURE:
- [Describe layout: 2 columns, header + content + CTA, 3-item grid]
- [What state is needed: hover effect, toggle, active state]

TECH:
- Inline CSS (no external library)
- Functional React component only
- No external dependencies

IMPORTANT:
- All text should be realistic placeholder (not "Lorem ipsum")
- Icons: use Unicode emoji or simple inline SVG

Prompt for Glassmorphism Pricing Card

Prompt
Create a React component: Pricing card with 3 tiers (Free, Pro, Enterprise).

Aesthetic: dark mode, glassmorphism cards on gradient background (deep purple → dark navy). Neon blue border on Pro card (recommended tier). Subtle glow effect.

Structure of each card:
- Tier name badge (top)
- Price (large, bold)
- Feature list (5 items with checkmark icon)
- CTA button (gradient for Pro, outlined for other tiers)

Typography: Inter font (use system-ui fallback), price very large (4xl), feature text small.

State: Hover on card → subtle scale up + increased glow. CTA button hover → increased brightness.

Use inline CSS since no Tailwind. React functional component.

Prompt for Dashboard Hero Section

Prompt
Create a React component: Dashboard hero section with metrics overview.

Layout: Full-width header, 4 metric cards below (bento-style — 2 large cards left, 2 small cards right), minimal chart placeholder.

Aesthetic: Ultra dark background (#0a0a0f), card background with subtle transparency, green and blue accents for positive metrics, red for negative.

Metric cards:
- Total Revenue: $124,590 (+12.3%)
- Active Users: 8,492 (-2.1%)
- Conversion Rate: 3.8% (+0.5%)
- Avg Session: 4m 23s (+18%)

Each card: metric name → large value → change indicator with arrow + percentage.
Hover: card scales slightly + border highlights.

No real chart needed — just a placeholder rectangle with a label.

How to Iterate Through Chat

After Claude generates the first component, use chat to refine:

Change colors:

"Switch background from navy to dark charcoal (#1a1a1a), and accent color from blue to emerald green"

Adjust spacing:

"Increase padding inside cards, add more space between icon and text"

Add interaction:

"Add smooth 200ms transitions to all hover effects"

Simplify:

"Remove the complex animation, keep the design cleaner, less is more"

Responsive:

"Make cards stack to 1 column on mobile (max-width 768px)"


Claude vs. v0.dev: Which Should You Use?

Claude Artifactsv0.dev
No separate account needed✅ (works in Claude.ai)❌ (needs Vercel account)
Live preview
Output stackFlexible: React, HTML, or mixReact + Tailwind (fixed)
Uses TailwindNot by default✅ Tailwind native
Iterate through chat✅ Natural conversation
Export codeCopy from ArtifactsCopy or deploy

When to use Claude: You want flexibility in styling approach, don't need Tailwind, or want to iterate quickly in your current chat window.

When to use v0.dev: You need React + Tailwind specifically and will integrate into a Next.js project.


Related reading: