Writing AI Prompts for UI: Get Layouts That Look Designed
Prompt an AI for professional UI by naming the layout, spacing, type scale, states, and accessibility instead of asking for something modern.
By UndieGravity, , 2 min read
Ask an AI for "a modern, beautiful landing page" and you get the average of the internet: gradients, glowing buttons, and emoji. Designers do not describe work in adjectives; they describe structure, spacing, and states. Prompts that do the same get much better results.
Replace adjectives with specifics
Instead of: a clean, modern pricing section
Write: a pricing section with three cards in a row on desktop and
stacked on phones. Middle card highlighted with a 2px accent
border. Each card: plan name, price, one line summary, five
features with check icons, full width button. 24px padding,
16px gap, 12px corner radius. No gradients, no shadows
larger than shadow-sm.Give it your design tokens
Paste your color and spacing tokens, or point to the file that defines them: "Use only the colors defined in app/globals.css." This keeps new sections consistent with the rest of the site instead of introducing new shades.
Describe every state
- Loading: skeleton, spinner, or disabled button?
- Empty: what does the list show with no items?
- Error: where does the message appear?
- Hover, focus, and active states for interactive elements.
- Long content: what happens with a very long name or title?
Most AI-generated UI only handles the happy path unless you ask.
Ask for accessibility explicitly
Requirements: semantic HTML, visible focus styles, labels on every
input, aria-label on icon-only buttons, text contrast at least 4.5:1,
works with keyboard only.Reference real patterns
"A settings page like the one in GitHub: left navigation, content on the right, sections separated by dividers" gives the model a concrete target. Naming a pattern (sidebar layout, bento grid, master-detail list) works better than describing a feeling.
Say what you do not want
- No emoji as icons; use the project's icon library.
- No placeholder text like lorem ipsum.
- No new UI libraries.
- No animation except opacity and transform.
Iterate with screenshots
If your assistant accepts images, send a screenshot of the result and describe what is off: "The cards are different heights; align the buttons to the bottom." Visual feedback converges faster than describing the problem in words.