Try Kimi at kimi.com →

Design to Code with Kimi

Kimi can look at a picture of a design and write the code for it. Give it a mock-up, a screenshot or even a screen recording, and it builds a web page to match. This guide shows the steps, the prompts that work, and how to close the gap between "close" and "right".

6 stepsPrompts included
Your design Kimi writes code Working page Design matched. Now fine-tune ✓

Kimi reads your design, writes the code and shows you a working page.

QUICK ANSWER

The short version

  1. 1

    Upload your design

    A clear image of the page: a mock-up, a screenshot or a sketch.

  2. 2

    Ask Kimi to build it

    Say what to match and how the code should be written.

  3. 3

    Compare and fix

    Put the result next to the design and ask for the differences to be fixed.

BASICS

What does "design to code" mean?

A designer draws how a page should look. A developer then writes code so a browser can show it. Design to code means letting Kimi do that second part. It works because Kimi K3 can see: it reads the layout, colours, text and spacing in your picture, then writes HTML and CSS to rebuild them.

It sees

Kimi K3 reads images directly. You do not have to describe the design in words.

It builds

It writes the code, and in Kimi Build it also creates images and icons and shows a live preview.

It refines

You point at what is wrong and it changes the code, round by round.

This is one part of what Kimi calls visual coding. See the Visual Coding guide for the wider picture.

INPUTS

What you can give Kimi

A design mock-up

An image exported from your design tool. The best starting point.

A screenshot

A picture of a page you want to rebuild or redesign.

A sketch

A clear photo of a drawing on paper or a whiteboard.

A screen recording

A short video of a site in use. Kimi Build tries to rebuild the look and how it moves.

Kimi's help centre lists text, design mock-ups or screenshots, screen recordings and templates as ways to start a build.

WHERE

Three places to do it

FeatureKimi BuildChat with Kimi K3Kimi Code
Best forPeople who want a live site and do not codeGetting the code for one page or partDevelopers adding a design to an existing project
You give itAn image, a recording or a templateAn image and a promptAn image pasted into the terminal tool
You getA preview you can click, and a published linkCode in the chat to copyFiles changed in your own project
Fixing thingsClick the part and leave a noteDescribe the change in wordsDescribe the change. It asks before editing
GuideBuild a websiteKimi K3Kimi Code setup

On a small screen, swipe the table sideways to see every column.

Not sure? Start with Kimi Build. Seeing a live preview next to your design makes the differences easy to spot.

EXPECT

What to expect

Think of the first result as a strong draft. Knowing where it is usually good and where it usually slips saves you time.

Usually good

  • Overall layout and sections
  • Colours and general style
  • Text content it can read
  • Buttons, cards and menus

Often needs a fix

  • Exact spacing and sizes
  • The exact font
  • How it looks on a phone
  • Small icons and fine detail

You must supply

  • Your real photos and logo
  • Fonts you have a licence for
  • Real links, forms and data
  • The final check

This is our general guidance for image-to-code tools. For independent results on Kimi's front-end work, see the Kimi AI review.

Step 1

Prepare the design

A clear picture gives a better page. Five minutes here saves several rounds of fixes.

0 of 5 done

Kimi's help pages say each uploaded file can be up to 100 MB, so image size is rarely a problem.

Step 2

Upload and describe

Attach the image, then tell Kimi what you want. The picture shows the look. Your words fill in what a picture cannot show.

What it is"A landing page for a yoga studio"
How to build it"Plain HTML and CSS in one file"
What to match"Layout, colours, spacing and fonts"
Small screens"Stack the columns on a phone"
What is missing"Use grey boxes where photos go"
Too thin

Make this.

Kimi has to guess the tools, the phone layout and what to do about photos.
Clear

Build this design as a responsive web page in one HTML file with CSS. Match the layout, colours, spacing and fonts as closely as you can. On a phone, stack the columns. Use grey boxes where the photos go. The heading font is Poppins.

Kimi knows the goal, the limits and the details a picture cannot show.
Step 3

Compare with the design

Put the preview and your design side by side. Go from top to bottom and write down each difference. A numbered list is easier to fix than "it looks a bit off".

DesignBuilt page 1. Heading font differs 2. Gap is too big 3. Button colour differs
  1. Layout: are the sections in the right order and the right widths?
  2. Text: right font, size and weight? Any words misread?
  3. Colour: do backgrounds, buttons and links match?
  4. Spacing: are the gaps between things about right?
  5. Behaviour: do buttons and menus respond when you use them?
Step 4

Fix the differences

In Kimi Build

Press Edit on the preview, click the part that is wrong and leave a short note. Add all your notes, then send them together.

In chat or Kimi Code

Name the part and say exactly what to change:

  • "The heading should be Poppins, bold, 48 pixels."
  • "Halve the gap between the text and the button."
  • "The button colour should be #E64980."
Send the design again. For a stubborn difference, upload a close-up of that part of the design and a screenshot of the built version, and say: "Make the second match the first."
Group your changes. Each round uses credits. Five notes in one message cost less than five messages.
Something broke? In Kimi Build every version is saved. Restore the last good one and try the change again in smaller steps.
Step 5

Make it work for everyone

A design is one picture. A real page has to work on every screen and for every visitor. Ask Kimi for these before you call it finished.

Phones and tablets

Switch the preview to mobile view. Nothing should overlap, shrink too small or need sideways scrolling.

Accessibility

Ask for image descriptions, enough colour contrast, and buttons and links that work with a keyboard.

Real content

Replace filler text and grey boxes with your own words and pictures. Check every link and form.

Step 6

Take the code

Publish it

In Kimi Build, press Publish to get a link ending in .ok.kimi.link.

Publishing guide

Download it

Open All Files and download the project to host it yourself or hand it to a developer.

Keep building

Open the code in your own project and continue with Kimi Code.

Kimi Code setup

If a developer will take over, ask Kimi first: "Tidy the code, use clear names, and add short comments." It makes the handover much easier.

PROMPTS

Design-to-code prompts you can copy

Attach your image first. Replace anything in [square brackets] with your own details.

Mock-up to page

Build the attached design as a responsive web page in one HTML file with CSS. Match the layout, colours, spacing and fonts as closely as you can. Use grey boxes where the photos go.

One part only

Write the HTML and CSS for just the [pricing table] in the attached design. Make it reusable, and make it stack neatly on a phone.

Sketch to page

This is a photo of my hand-drawn sketch for a [type of page]. Turn it into a clean, modern web page. Keep my layout, and choose a simple colour scheme and font.

Redesign my page

This is a screenshot of my current page. Keep the same content, but redesign it to look cleaner and more modern, with more white space and a clearer main button.

Match my framework

Build the attached design using [React and Tailwind CSS]. Split it into sensible components and name them clearly.

Find the differences

The first image is my design. The second is a screenshot of what you built. List every visible difference, then fix them all.

Finishing prompts

Phone check

Check this page at phone width. Fix anything that overlaps, is too small to tap, or needs sideways scrolling.

Accessibility pass

Add a description to every image, make sure text has enough contrast with its background, and check every button and link works with a keyboard.

Tidy for handover

Tidy the code for another developer: clear names, no repeated styles, and a short comment above each section.

FAIR USE

Use designs fairly

  1. 1

    Build your own designs

    Or ones you have clear permission to use.

  2. 2

    Do not clone brands

    Never copy another company's site, logo or name, or make a page that could be mistaken for theirs.

  3. 3

    Check your fonts and photos

    Use fonts and images you have the right to use on a website.

  4. 4

    Take ideas, not copies

    Use other sites for inspiration. Change the layout, words and look to make it yours.

  5. 5

    Keep private designs private

    Do not upload client work that is under a confidentiality agreement.

  6. 6

    Review before you ship

    You are responsible for what goes live. Test it yourself.

HELP

Fix common problems

The fonts do not match
  • Kimi cannot always tell a font from a picture. Tell it the font name.
  • If the font is a paid one, the page needs your licensed font files to show it.
The spacing is off
  • Give numbers where you can: "24 pixels between cards".
  • Send a close-up of the part and a screenshot of the result, and ask Kimi to match them.
It looks wrong on a phone
  • A desktop design does not say how to fold. Upload a phone mock-up, or describe what should stack.
  • Ask: "Fix the layout on phone screens. Nothing should overlap."
The photos and icons are missing or different
  • Kimi cannot lift your real photos out of a mock-up. It uses stand-ins or makes new images.
  • Upload your own image files and ask Kimi to place them.
It misread some of the text
  • Small or blurry text is hard to read. Export a sharper image.
  • Paste the real text into your message so nothing has to be read from the picture.
The code is messy or too long
  • Build one section at a time for a big page.
  • Ask for a tidy-up at the end, with clear names and comments.

More help: Kimi AI not working: common fixes.

FAQ

Design to code questions

Yes. Kimi K3 can read images, so you can upload a design mock-up or a screenshot and ask it to write the code for a matching web page. Kimi Build can also turn it into a live site.

Use an image of the design, such as a PNG or JPG exported from your design tool, a screenshot, or a clear photo of a sketch. Kimi Build also accepts a screen recording of a site in use.

Expect a close first version, not a perfect copy. Layout, colours and structure usually come out well. Exact spacing, fonts and complex movement often need a few rounds of fixes.

No, if you use Kimi Build, which shows a preview and publishes the site for you. If you want to use the code in your own project, some coding knowledge helps you check and adjust it.

It needs Kimi K3 or Kimi Build, which are paid-plan features that use credits. Paid plans start at $19 a month.

Only copy designs that are yours or that you have permission to use. Do not rebuild another company's site, brand or logo. Use other sites for ideas, not as something to clone.
NEXT

Related guides

Have a design ready?

Building happens on Moonshot's own site, never on this page. We are an independent guide.