P

GitHub Copilot Prompt to Create a UI Design

GitHub Copilot, GitHub's AI-powered coding assistant, has become an indispensable tool for developers looking to speed up their user interface creation workflow. Whether you work with React, Vue, Tailwind CSS, or plain HTML/CSS, Copilot can generate complete UI components, responsive layouts, and consistent design systems directly in your editor. The main challenge lies in prompt quality: a vague prompt will produce a generic component, while a structured prompt with precise constraints — target framework, design tokens, accessibility, responsive breakpoints — will generate production-ready code. In this guide, we offer optimized prompts to get the most out of Copilot in your UI design projects, covering both isolated component creation and complete design system setup. Each prompt has been tested and refined to produce immediately usable results, with clean, semantic code that meets modern frontend development standards.

The prompt

GitHub Copilot

Create a UI component [type: card/modal/navbar/form] in [React with TypeScript / Vue 3 / HTML-CSS] using [Tailwind CSS / CSS Modules]. The component must meet these constraints: 1) Design system: color palette [specify primary and secondary colors], typography [font-family, sizes], spacing based on a 4px scale. 2) Responsive: mobile-first with breakpoints sm (640px), md (768px), lg (1024px). 3) Accessibility: appropriate ARIA roles, keyboard navigation, minimum WCAG AA contrast. 4) Interactive states: hover, focus, active, disabled with smooth transitions (200ms ease-in-out). 5) Structure: separate logic, style, and template. Include necessary props/types with sensible default values. Add comments explaining design choices.

Personalize this prompt with Léa

Answer 3 questions and Léa tailors the prompt to your situation.

Why it works

This prompt works because it provides Copilot with an explicit constraint framework that eliminates ambiguity: framework, design system, breakpoints, and accessibility criteria are all specified. The numbered structure guides the model to address each aspect sequentially rather than producing a partial result. By requesting comments on design choices, Copilot is forced to reason about its decisions, improving the coherence of the generated code.

Expected result

You will obtain a complete, functional UI component with typed TypeScript code, organized Tailwind styles, and a responsive structure tested on all specified breakpoints. The component will include interactive states with animations, ARIA accessibility attributes, and documented props with their types and default values.

Variants by level

FAQ

Can GitHub Copilot generate UI designs as well as a professional designer?
Copilot excels at generating structured, functional UI code, but it does not replace a designer's eye for user experience, visual hierarchy, or brand identity. Its strength lies in quickly translating design specs into clean code. The best approach is to use Copilot to implement a pre-designed UI (Figma mockup, wireframe) rather than asking it to design the experience from scratch. Combine it with an existing design system like Shadcn/ui or Radix for optimal results.
How can I get accessible UI code with GitHub Copilot?
Explicitly mention your accessibility requirements in the prompt: target WCAG level (AA or AAA), keyboard navigation, ARIA roles, and focus management. Copilot generally respects these constraints when specified. For example, specify 'minimum contrast 4.5:1 for text, 3:1 for interactive elements, aria-label attributes on icon buttons, visible focus with a 2px outline'. Always verify the result with a tool like axe-core or Lighthouse, as Copilot may omit some ARIA attributes on complex components.
What is the best workflow for creating a complete design system with Copilot?
Proceed in successive layers rather than generating everything at once. Start with design tokens (colors, typography, spacing) in a configuration file. Then generate primitive components (Button, Input, Badge) one by one, referencing these tokens. Next, compose complex components (Card, Modal, DataTable) from the primitives. At each step, open the already generated files in your editor so Copilot can draw inspiration from them and maintain consistency. This incremental workflow produces far more coherent code than a single prompt asking for the entire system.

Related prompts

How to use this prompt

  1. Copy the prompt with the button above.
  2. Paste it into ChatGPT, Claude or your favorite AI assistant.
  3. Replace the bracketed variables with your details, then refine the result.

About Prompt Guide

Prompt Guide is a free library of 2500+ ready-to-use prompts for ChatGPT, Claude and other AIs, with guides to learn prompting and tools to build and optimize your own prompts.

More prompts to explore

GitHub Copilot Prompt to Create YouTube Thumbnails

GitHub Copilot, GitHub's AI-powered coding assistant, can be a formidable ally for generating striking YouTube thumbnails directly from your code editor.

Midjourney Prompt for Analyzing a Contract

Midjourney, as an AI image generation tool, cannot analyze the textual content of a contract in the legal sense. However, it excels at creating impactful visuals to illustrate complex contractual concepts: negotiation process infographics, visual representations of key clauses, decision flow diagrams, or professional illustrations for legal presentations. These visuals transform dry documents into engaging communication materials, making them easier to understand for non-legal audiences. Whether you are a lawyer preparing a client presentation, a legal officer training your teams, or an entrepreneur looking to simplify your terms and conditions, Midjourney allows you to create professional-quality visual representations. The following prompts are designed to generate clear, structured illustrations that are appropriate for the legal and contractual context, respecting the visual codes of the sector: sobriety, clarity, and professionalism. Discover how to turn contract analysis into a visual experience with optimized prompts for Midjourney.

Midjourney Prompt for Creating E2E Tests

Midjourney, renowned for its power in AI image generation, can play an unexpected but strategic role in the creation of E2E tests.

Midjourney Prompt for Organizing a Project

Midjourney is primarily known for generating artistic images, but it proves to be a powerful tool for creating impactful project management visuals.

Midjourney Prompt for Planning a Product Launch

Midjourney has become an essential tool for marketing teams and entrepreneurs who want to bring their product launch vision to life before

Midjourney Prompt for Writing a Newsletter

Midjourney has become an essential tool for creating impactful visuals that accompany your newsletters. In a context where inboxes are saturated, the header image or illustrations embedded in your newsletter make all the difference between an email that's opened and one that's ignored. With Midjourney, you can generate custom visuals that reinforce your editorial message, illustrate your sections, and create a consistent visual identity from one edition to the next. Whether you produce a weekly tech newsletter, a monthly digest for your community, or a corporate newsletter, Midjourney lets you produce professional-quality images without hiring a graphic designer. The prompts presented on this page are specifically designed to generate visuals suitable for newsletter format: horizontal banners, section illustrations, thematic icons, and mood images. Each prompt includes essential technical parameters such as the aspect ratio suited for emails and a visual style consistent with email marketing standards. Discover how to transform your newsletters into memorable visual experiences.

Go further

Get new prompts every week

Join our newsletter.