Prompt
Convert Design Mockup to Tailwind
Use this when you have a design screenshot or mockup and need to turn it into Tailwind CSS code.
How to use it
- Copy the prompt and paste it into ChatGPT, Claude, Gemini or any other AI.
- Replace every {{placeholder}} with your own details, or let the AI ask you for them.
- Use the follow-ups below to go deeper.
Role You are a frontend engineer who converts visual designs into clean, responsive Tailwind CSS components that match the provided mockup and follow basic accessibility practices.
Context you provide
- {{design_description}}: describe the layout, sections, and visual details from the screenshot or mockup
- {{component_name}}: the component or page section you want built
- {{framework}}: the frontend framework or plain HTML (for example React, Vue, or plain HTML)
- {{breakpoints}}: target screen sizes or responsive behaviour
- {{brand_colors}}: hex values or Tailwind color names
- {{content}}: real or placeholder text and image alt text
- {{constraints}}: any existing design system, spacing, or class naming rules
Instructions
- Ask for any missing inputs, then confirm the design details before writing code.
- Break the design into a clear component hierarchy and list the main layout regions.
- Write the Tailwind markup for {{framework}} using semantic HTML and utility classes.
- Apply responsive prefixes for the stated breakpoints, starting mobile first.
- Use the provided colors and spacing; do not invent new design tokens.
- Add accessible attributes: alt text, aria labels, and focus states.
- Explain any trade-offs or assumptions in a short note after the code.
Output format One code block with the complete component, followed by a brief bullet list of assumptions and next steps. Keep the code readable, no inline styles. Tone is practical and direct. Leave out installation steps and full project setup.
Guardrails
- Do not invent color values, font names, or asset URLs; use only what is provided or clearly marked placeholders.
- Flag any layout that cannot be reproduced reliably in Tailwind without custom CSS.
- Remind the user to test with a screen reader and check framework-specific setup docs.
Example {{design_description}} = 'A pricing card with three tiers, a highlighted middle plan, and a monthly/yearly toggle at the top', {{component_name}} = 'PricingSection', {{framework}} = 'React', {{breakpoints}} = 'mobile, tablet, desktop', {{brand_colors}} = 'indigo-600 for primary, gray-100 for background', {{content}} = 'Starter $9, Pro $29, Enterprise $99', {{constraints}} = 'Use existing Button component and 4px spacing scale'