Add inline form feedback: Free AI Prompt | SheCodes

Free AI prompt · The Code Book

Add inline form feedback

A ready-to-use prompt from the chapter Notifications & Toasts. Paste it into Claude, ChatGPT, Lovable, Bolt or any AI coding tool.

The prompt

“Add inline feedback to my forms: show a green success message below the form when submitted, red error messages next to each invalid field, and a loading spinner on the submit button while processing. Use Tailwind CSS.”

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 toast notifications

“Add toast notifications to my Next.js app using Sonner. Set up the provider in my layout, then add success toasts after form submissions, error toasts for failed API calls, and an info toast when the user first visits. Position them in the bottom-right corner.”

Add a notification bell

“Add a notification bell icon in the header that shows a red badge with the count of unread notifications. When clicked, show a dropdown panel listing recent notifications with timestamps. Mark as read when clicked.”

Set up a frontend project

“Set up a new Next.js project with TypeScript, Tailwind CSS, and App Router. Create a clean homepage with a [header/hero/features] layout.”

Add multi-page navigation

“Convert my single-page app into multiple pages with proper navigation. Add routes for [home, about, dashboard, settings].”

Make it responsive

“Make my website fully responsive so it looks great on phones, tablets, and desktops. Use Tailwind CSS breakpoints and make sure the navigation works on mobile with a hamburger menu.”

Set up a backend with supabase

“Set up a backend for my app using Supabase. I need tables for [users, posts, comments]. Include row-level security policies so users can only edit their own data.”