Skip to main content

Claude/ChatGPT Prompt to Build a Reusable SaaS Empty-State System

Reusable EmptyState component for SaaS apps: variants for no-data, no-results, error and permission-denied, with illustration, copy and CTAs.

Fill in the placeholders

Edit the values, then copy your finished prompt.

Your Prompt
prompt.txt
You are a senior frontend engineer and product designer. Specify a reusable empty-state system tightly enough to build, and return working component code.

Context:
- Stack: React + Tailwind + shadcn/ui
- Product type: a project management SaaS
- Brand tone: friendly and concise
- Variants needed: no-data, no-results, error, permission-denied

Deliverables:
1. A single EmptyState component with a typed variant prop covering the listed variants.
2. Props for illustration/icon, title, description, primary CTA, and an optional secondary link.
3. Sensible defaults per variant so a screen can render a good empty state with minimal props.
4. Accessibility: proper heading level, focus order, and CTAs reachable by keyboard.
5. Four example usages across a list, a table, a dashboard, and a detail screen.
6. Concise, helpful microcopy for each variant in the brand tone — no dead-end dead-ends.

Output: the component code, a props table, and the four example usages as separate code blocks.

What this prompt does

This prompt specifies a reusable empty-state system for a SaaS app and returns working component code. It centers on a single EmptyState component with a typed variant prop covering the variants you list, plus props for illustration or icon, title, description, primary CTA, and an optional secondary link. Sensible per-variant defaults mean a screen can render a good empty state with minimal props, and the microcopy is written so no variant ends in a dead-end.

The variables tune the system to your app. [stack] (for example, React with Tailwind and shadcn/ui) sets the component conventions. [product] gives context so the defaults and copy fit. [tone] drives the microcopy voice. [variants] is the key input — it defines the typed variant prop and the cases the component must cover, such as no-data, no-results, error, and permission-denied, each getting its own sensible defaults.

When to use it

  • You want one reusable empty-state component instead of ad-hoc blank screens
  • Your app has several empty cases: no-data, no-results, error, permission-denied
  • You want sensible per-variant defaults so screens render good states with minimal props
  • You need empty states that point users at a next action, not dead ends
  • You care about accessible heading levels, focus order, and keyboard-reachable CTAs
  • You want example usages across a list, table, dashboard, and detail screen

Example output

The model returns the component code, a props table, and four example usages as separate code blocks — across a list, a table, a dashboard, and a detail screen. The EmptyState component takes a typed variant prop for your listed variants, with props for illustration, title, description, primary CTA, and an optional secondary link. Each variant has sensible defaults and helpful microcopy in your brand tone, plus proper heading level, focus order, and keyboard-reachable CTAs.

Pro tips

  • List every case you need in [variants]; it defines the typed variant prop, so anything omitted has no first-class state
  • Spend real effort describing [tone] — the copy is what turns a blank screen into onboarding rather than an error page
  • Set [stack] to your frontend so the component and props table match your conventions
  • Use the per-variant defaults so most screens need minimal props, keeping usage consistent across the app
  • Keep the accessibility requirements: proper heading level, focus order, and keyboard-reachable CTAs
  • Adapt the four example usages to your real screens so the component is proven across list, table, dashboard, and detail layouts
  • Give every variant a primary CTA that points somewhere; the brief is explicit about no dead-end screens, so even an error state should offer a retry or a way out
  • Lean on the per-variant defaults so a developer dropping in an empty state gets good copy for free rather than inventing it on each screen

Frequently Asked Questions

Is this one component or a separate one per empty state?
It is a single `EmptyState` component with a typed variant prop. The variants you list in `[variants]`, such as no-data, no-results, error, and permission-denied, are all handled by that one component, each with sensible defaults, so you do not maintain separate components per case.
Why does the prompt emphasize the microcopy so much?
Because empty states are often skipped until launch and then read like error pages. The copy is what turns a blank screen into onboarding by pointing users at a next action. Investing in `[tone]` and the per-variant messaging is what makes the difference between a dead end and a useful screen.
Does it cover accessibility?
Yes, deliverable 4 requires a proper heading level, sensible focus order, and CTAs reachable by keyboard. So screen-reader users and keyboard users get a coherent empty state rather than an unlabeled block with unreachable actions.
Will it show how to use the component in real screens?
Yes, it returns four example usages as separate code blocks across a list, a table, a dashboard, and a detail screen. That shows how the same component adapts to different layouts, so you can see the variant and props in realistic contexts before wiring it into your app.
Engr Mejba Ahmed

Need this built for real?

Engr Mejba Ahmed

AI Developer · Software Engineer

I'm Mejba — I design and ship production AI systems, automations, and full-stack apps. If you want this turned into a working solution for your team, let's talk.

More in Tech & SaaS UI Prompts

Engr Mejba Ahmed

Engr Mejba Ahmed

AI assistant · trained on my work

👋

Hey there!

Quick Actions

WhatsApp Direct line to me

Chat on WhatsApp

+880 1723 741224 · Replies within the hour on working days

Popular Questions

Engr Mejba Ahmed is connected
Engr Mejba Ahmed is typing...
Engr Mejba Ahmed avatar

✉ Want me to follow up? Drop your email

Engr Mejba Ahmed avatar

📞 Connect Directly

Choose how you'd like to reach me

WhatsApp

+880 1723 741224

Email

mejba.13@gmail.com

✓ Details sent! I'll get back to you shortly.

Powered by OpenAI

335+

Blog Posts

25

AI Courses

63

Projects

Services & Expertise

Pricing & Process

Learning & Resources

Connect & Support