Add confirmation toasts: Free AI Prompt | SheCodes

Free AI prompt · The Design Book

Add confirmation toasts

A ready-to-use prompt from the chapter User Experience Basics. Paste it into Claude, ChatGPT, Lovable, Bolt or any AI coding tool.

The prompt

“Whenever a user successfully saves, deletes, copies, sends, or otherwise completes an action in my app, show a small toast notification confirming what just happened. Use Sonner or a similar library. Make sure errors show as red toasts and successes as green ones.”

How to use it

  1. Copy the prompt and paste it into your AI coding tool.
  2. Check the result in the preview, then ask for changes one at a time: "make the buttons bigger", "use my brand colours".
  3. Read the chapter to understand why it works and what to do next.

More prompts like this

All prompts

Add all three states

“For every place in my app that shows a list of items, add proper loading, empty, and error states. Use animated skeleton loaders while data loads, a friendly empty state with a CTA when there's nothing to show, and a clear error message with a retry button when fetching fails.”

Add loading states everywhere

“Find every place in my app that fetches data and add a proper loading state. Use skeleton loaders (gray animated placeholder boxes) instead of generic spinners. Make sure no part of the UI shows blank while data is loading.”

Fix tap targets on mobile

“Audit my site for tap targets that are too small on mobile. Every button, link, icon, and checkbox should have at least 44×44 pixels of tappable area. Add invisible padding where needed without changing the visual design.”

Apply your colors and fonts

“Update my site to use this design system. Colors: Primary [#hex], Secondary [#hex], Background [#hex], Text [#hex], Accent [#hex]. Fonts: Headings [font name] bold, Body [font name] regular. Apply these consistently across all components (buttons, links, headings, card backgrounds, borders, and hover states). Make sure there's enough contrast for readability.”

Upload a screenshot and build it

“I'm uploading a screenshot of a website design I like. Please recreate this layout and visual style for my [type of project]. Use my color palette: Primary [#hex], Secondary [#hex], Background [#hex]. Use [font name] for headings and [font name] for body text. Match the spacing, typography hierarchy, and overall feel as closely as possible. Build it with Next.js and Tailwind CSS.”

Upload a Stitch design and build it

“I'm uploading a UI design I created in Google Stitch. Please recreate this exact design as a working website. Use my color palette: Primary [#hex], Secondary [#hex], Background [#hex]. Match the layout, fonts, spacing, and component styles as closely as possible. Build it with Next.js and Tailwind CSS.”