# How to build an app UI from scratch in Draftbit

> Build your first app in Draftbit: let the AI agent build a shopping list, then change its words, styles, icons, and colors yourself, or ask the agent instead.

Source: https://draftbit.com/blog/how-to-build-an-app-ui-from-scratch-using-draftbit/ · By Brian Luerssen · Last updated: November 16, 2026

Draftbit is an AI app builder: you describe the app you want, an AI agent builds it, and you can keep changing it by chatting with the agent or by editing its screens yourself. In this tutorial, you'll use the agent to build a one-screen shopping list app, from a blank project to a working preview, and then change its look with the builder's visual tools: the words, the text styles, an icon, a deleted line, and the colors across the whole app. For each visual change, we also give the prompt that gets the agent to do it instead. It's written for people who've never built an app, and you won't need to write any code.

We followed every step below in November 2026 on a test copy of Draftbit, and the screenshots come from that build. Because an AI agent writes the app, yours won't look exactly like ours, so step 8 has a short checklist that tells you whether your app works, whatever it looks like.

## What you need before you start

- **A Draftbit account.** The Free plan is enough. It [doesn't expire](/faq/is-draftbit-free-and-how-much-does-it-cost/) and comes with 5,000 one-time credits, and across our three tries, the first build of this app used between 308 and 443 of them.
- **A computer with a browser.** You'll build and test the app in the browser.
- **A phone, if you want to try step 17.** It's optional.

Most of the time goes to the agent's first build, which took between 3 and 6 minutes for us.

## Step 1: Start a new project

On your dashboard, click **Start new project** (or **Create New Project** in the sidebar). On the first question, **How do you want to start?**, choose **Start a new app**, and click **Continue**.

*Screenshot: The How do you want to start? screen in Draftbit, with two choices, Start a new app and Continue an existing app, and Back, Continue, and Create a blank project buttons below. The first question when you start a new project.*

The other choice, **Continue an existing app**, is for code you already have, so you can ignore it for now.

## Step 2: Choose Mobile App

On **What would you like to build first?**, choose **Mobile App** and click **Continue**. A Mobile App works on iPhone, Android, and the web from one set of code, written in React Native and Expo. You won't need to open that code in this tutorial, but it's yours, and you can [export it](/faq/can-i-export-and-continue-outside-draftbit/) on Standard and up.

## Step 3: Describe your app

The next screen, **Tell us more about what you want to build**, is where you describe the app. Paste this into the **Your idea** box:

> My Shopping List is a simple shopping list app. Use one screen with a text box and an Add button. Let me add items, check them off when I've bought them, and delete them. Show bought items crossed out, and don't add empty items. Save the list on this device so it's still there after I reload. Leave out sign-in, a backend, and sharing for now.

*Screenshot: The Tell us more about what you want to build screen, with the shopping list description in the Your idea box, example ideas below it, and the Recommend my setup and Skip, I'll choose myself buttons. Our description in the Your idea box.*

That description names the app, says how many screens it has, lists what you can do, says where the list is saved, and says what to leave out. If you want to build something else later, you can use the same shape:

> [App name] is a [kind of app] for [who it's for]. It has [screens], and it lets me [actions]. Save [what] [where]. Leave out [extras] for now.

Start with the app's name, as ours does. The first time we tried this, our description began "Build a shopping list app called My Shopping List", and the project came out named "Build My". That's harmless, but starting with the name gives your project a sensible name from the beginning.

Then click **Skip, I'll choose myself**. **Recommend my setup** would work out from your description whether you need a backend and sign-in, which is useful for bigger apps, but we already know this one doesn't need them.

## Step 4: Skip the backend for now

On **Do you want a backend?**, choose **No backend for now** and click **Continue**.

A backend is where an app keeps data that has to be shared, such as accounts or a list two people edit together. This app saves its list on the device instead, which is simpler, but it means the list on your phone and the list in your browser are separate. When you need sign-in or shared data, you can add a [Supabase backend](https://docs.draftbit.com/features/supabase/) to the project later.

## Step 5: Choose how to use AI

On **How do you want to use AI?**, choose **Draftbit credits**, and the button changes to **Start with Draftbit credits**. Click it.

If you already pay for ChatGPT or Claude, you can pick **OpenAI / ChatGPT** or **Anthropic / Claude** instead and sign in with that plan. The Free plan includes 20 agent runs a week on your own subscription, and you can change this later in the project's settings.

## Step 6: Start building, and check the prompt

On **How do you want to begin?**, choose **Start building now**, and click **Check the prompt**.

*Screenshot: The How do you want to begin? screen with two choices, Create a plan and designs first, marked Recommended, and Start building now, which is selected. Start building now skips the plan and goes straight to a first version.*

**Create a plan and designs first** is marked as recommended when a description is only a few sentences. Planning first is worth it for a bigger app, because you review the screens and their designs before anything is built, but a one-screen app doesn't need a plan.

Next comes a build prompt written from your answers, on **Check the prompt we'll build from**. Read the **Screens** part before you go on. It should describe one screen with a text box, an Add button, and the list.

*Screenshot: The Check the prompt we'll build from screen, with a build prompt describing My Shopping List, its goal, who uses it, and one screen, and the Start building and Use my description as is buttons below. The build prompt Draftbit wrote from our description, with one screen, as we asked.*

This is the step to slow down on. In one of our three tries, the prompt split our one screen into three, and the app the agent built put adding items on a separate screen. If your Screens list doesn't match what you described, you can fix it in the box, or click **Use my description as is** to build from your own words. For the build in this post, we used our description as is. Otherwise, click **Start building**.

## Step 7: Wait for the first build

The app opens in the builder, starting with a loading screen that steps through **Initializing sandbox**, **Setting up project files**, **Installing dependencies**, and **Preparing builder**. The sandbox is the computer in the cloud where your app runs while you build it, and setting it up took under a minute for us, so a screen that sits on the first step for a little while is normal.

*Screenshot: The builder's loading screen, with the steps Initializing sandbox, Setting up project files, Installing dependencies, and Preparing builder, and a Did you know? tip below. The loading screen while your app's sandbox starts.*

Then the agent starts. The prompt you built from appears as the first message in the chat on the right, and the agent posts short notes as it works, such as the look it chose and when it's checking the layout. It's finished when the chat shows **Agent Run Finished** with how long it took and how many credits it used. Ours took 3 minutes 35 seconds and 330 credits.

*Screenshot: The chat panel, with our shopping list description as the first message and the agent's first notes below it, saying it will build a simple shopping list that saves on this device. The start of the chat, with the agent's first notes.*

## Step 8: Test your app in the preview

The phone-shaped frame in the middle of the builder is the preview, and it's your app running for real, so you can tap and type in it like you would on a phone. Run through this checklist:

1. Add "Apples", then add "Bread".
2. Check off "Apples". It should be crossed out.
3. Delete "Bread".
4. Clear the text box and try to add an empty item. Nothing should be added.
5. Click **Reload page** in the bar above the preview. "Apples" should still be there, checked off.

In ours, all five worked. The Add button was turned off while the text box was empty, and after the reload, "Apples" was still on the list and still checked off.

*Screenshot: Three phone previews of the shopping list. First, Apples and Bread on the list with 2 items left to buy. Second, Apples checked off and crossed out, with 1 item left. Third, after deleting Bread and reloading, Apples still checked off and 0 items left. Our app during the checklist: two items added, Apples checked off, and Apples still there after the reload. The "items left to buy" line comes from step 9.*

If something on the list doesn't work, tell the agent what you did, what you expected, and what happened, in a message like this:

> When I [did this], I expected [this], but [this happened]. Please fix it and keep the rest of the app the same.

If the preview is blank or stuck instead, click **Restart preview** in the preview toolbar before you ask the agent to fix it. Our [troubleshooting guide](https://docs.draftbit.com/intro/troubleshooting/common-issues/) says restarting is usually faster than having the agent try again, and it doesn't use credits.

## Step 9: Change how it works by chatting

Changes to how the app works, such as a new number that updates as the list changes, are the agent's job. Ask for this one in the chat box at the bottom right:

> Show how many items are left to buy under the title, and update the number when I add, check, uncheck, or delete an item.

Ours took 27 seconds and 59 credits, and the number appeared under the title. Add an item and check it off, and you'll see it count down.

*Screenshot: The chat panel after both runs. The agent's summary of the first build ends with Agent Run Finished, 3m 35s, 330 credits. Below it, our request to show how many items are left, the agent's reply, and Agent Run Finished, 27s, 59 credits. The end of the first build, then our change and the agent's reply.*

Our guide to [writing task prompts](https://docs.draftbit.com/intro/best-practices/composing-task-prompts/) recommends small, focused requests like this one, so when you have several changes in mind, send them one at a time.

## Change the look yourself, or ask the agent

Everything from here on changes how the app looks, and you can make each change in one of two ways. You can do it yourself in the builder's visual tools, which edit your app's code as you click, or you can describe the change to the agent. Below, we make each change by hand in our app and give the prompt that does the same thing.

We ran each of those prompts, worded for that app's text, in a second copy of the app to check them, and they worked. Each one took the agent between 25 and 46 seconds and used between 31 and 109 credits, while the same changes by hand took a few clicks each.

## Step 10: Switch to Design mode and change some words

The preview has two modes. In **Preview**, you use the app like a phone app. In **Design**, a click selects whatever you click, and the **Styles** tab on the right shows what you can change about it. Switch with the toggle above the preview, or with ⌘I (Ctrl+I on Windows).

To change the label above the text box:

1. Switch to **Design**, and click **What do you need?** in the preview.
2. Open the **Styles** tab. Under **Content**, change **Text** to "What's on your list?".

*Screenshot: The Styles tab's Content section with the Text field set to What's on your list?, above the preview, where the same label is selected with a Text badge. The new label in the Styles tab, and in the preview.*

The preview updates as soon as you change the text. The **Styles** tab has more sections below **Content**, including **Typography**, **Size & Spacing**, **Layout**, **Background**, and **Border**, and which ones open first depends on what you selected.

Or ask the agent: "Change the text that says What do you need? to What's on your list?"

## Step 11: Change how text looks

Next, make the count from step 9 stand out. Click **0 items left to buy** in the preview, and in **Typography**, set **Font Weight** to **Semi Bold** and **Text Color** to **Primary**, the app's main color.

*Screenshot: The Styles tab's Typography section for the count line, with Font Weight set to Semi Bold and Text Color set to Primary, and the classes text-primary and font-semibold added above. Typography for the count line, with Semi Bold and Primary picked.*

You'll notice that the count's **Text** field shows code instead of words. That's fine, because the number changes as you add and check off items, so its words come from code, but how it looks is still yours to change. Each choice you make adds a class, such as `font-semibold`, which you can see under **Classes**.

Or ask the agent: "Make the line that says how many items are left to buy semibold, and use the app's primary color for it."

## Step 12: Swap an icon

Click the basket icon at the top left of the preview (or its **Icon** row in the Component Tree, from step 13). Under **Content**, the **Icon** field shows its name, ShoppingBasket, and where it's from, Lucide. Click **Change**, search for "cart", and pick **ShoppingCart**.

*Screenshot: The Icon field showing ShoppingBasket from Lucide, with the Change search open, cart typed in, and two results, CarTaxiFront and ShoppingCart, and a note that Lucide has 1,636 icons. Searching the icon library for a cart.*

The picker searches the whole Lucide library, which had 1,636 icons when we checked.

Or ask the agent: "Replace the icon at the top left of the screen with a shopping cart icon."

## Step 13: Delete something

To remove the line "No account. No fuss." at the bottom of the screen, open the **Visual Editor** from the main menu on the left. Its **Component Tree** lists every component on the screen, top to bottom, and clicking one in the tree selects it in the preview, and the other way around. Hover over the line's row and click **Delete**, or right-click the row for the same option.

The tree is also where you can duplicate or move a component, or drag a new one in from the **Add Components** panel. Our [builder docs](https://docs.draftbit.com/features/ai-app-builder/#component-tree) cover each of those.

Or ask the agent: "Remove the small line of text at the very bottom of the screen."

## Step 14: Change your app's colors everywhere

So far, each change has been to one thing on the screen. Colors that the whole app shares live in **Themes & Design**, in the main menu.

1. Open **Themes & Design**, and stay on **Light Theme** and **Colors**.
2. Open the **Primary** group, which holds the app's main color.
3. Replace the **Primary** value with `hsl(151 45% 32%)`, a forest green, in the same format as the other colors in the list.

*Screenshot: Themes and Design with a live preview card whose Primary button is now green, a row of color swatches, the Base colors, and the Primary color set to hsl(151 45% 32%). The Primary color in Themes & Design, with its live preview.*

Everything that uses the main color turns green at once: the Add button, the count from step 11, the dot after the title, and the plus on the empty-list picture. Here's the screen before and after steps 10 to 14:

*Screenshot: Two phone previews of the shopping list. Before: an orange Add button, a basket icon, the label What do you need?, a plain count, and the footer No account. No fuss. After: a green Add button, a cart icon, the label What's on your list?, a green semibold count, and no footer. Before and after the visual changes in steps 10 to 14.*

The **Dark Theme** tab has its own colors, so a change to **Light Theme** doesn't carry over to dark mode. Switch to **Dark Theme** and set its **Primary** too if you want them to match.

Or ask the agent: "Change the app's primary color to a forest green." When we asked, the agent changed both the light and the dark theme. Here are the same five changes in our second copy of the app, all made by the agent:

*Screenshot: Two phone previews of a second shopping list app. Before: a purple Add item button, a list icon, Ready when you are, and a plain count. After: a green Add item button, a cart icon, What's on your list?, and a green semibold count. The same five changes, made by the agent in our second copy of the app.*

## Step 15: Check other devices and dark mode

Before you save, it's worth seeing the app on other screens. The device menu above the preview, set to **iPhone 16 Pro** by default, switches the preview between phones, tablets, and laptop and desktop sizes, from iPhones and iPads to Pixel and Galaxy models. The light/dark mode button in the preview toolbar switches the preview between your app's light and dark themes. Neither one changes your code.

*Screenshot: Two previews of the shopping list. Left: the app in dark mode, with a dark background and an orange Add button. Right: the app on a Pixel 4 in light mode, with the green Add button and cart icon from steps 12 to 14. Our app in dark mode, where the Add button is still orange because step 14 only changed Light Theme, and on a Pixel 4.*

## Step 16: Save your work, and undo if you need to

Your changes aren't saved yet. The green **Save** button at the top right shows how many files have changed, and clicking it opens **Save & Commit**, with a title and details written for you from what changed.

*Screenshot: The Save and Commit dialog, with a drafted title, Add a shopping list with automatic on-device saving, details, a What changed list of 13 files, and Cancel, Save and Publish, and Save buttons. Save & Commit, with the title drafted from our changes.*

Click **Save**. As the dialog says, saving adds a restore point to your app's history, and anything you've published doesn't change until you publish again. Each save shows up in the **History** tab, so you can always go back to an earlier version. For a change you've just made, the **Undo** button at the top of the builder takes it back.

*Screenshot: The History tab, with a commit called Add a shopping list with automatic on-device saving, its short ID, and 1 file with 166 lines added. Our first save in the History tab.*

## Step 17: Try it on your phone

To open the app on a real phone, install the Draftbit Preview app from the [App Store](https://apps.apple.com/us/app/draftbit-preview/id1605807667) or [Google Play](https://play.google.com/store/apps/details?id=com.draftbit.livepreview). Then click the play button at the top of the builder and scan the QR code with your phone.

*Screenshot: The Live Preview popover with a QR code and the text Scan this QR code with your phone to preview your app directly on your device. Scan the code from your own builder. This one opened our test app.*

Your phone saves its own list, separate from the one in the browser preview, for the reason in step 4. The Preview app also runs your code with its own built-in set of native libraries, so if you later add a feature that needs one it doesn't include, that screen won't load there. Our [on-device preview docs](https://docs.draftbit.com/features/ai-app-builder/#on-device-previews) cover what to do then.

## Visual tools or the agent: which to use

Both change the same code, so you can mix them freely. Here's how the changes in this tutorial line up:

| Change                 | Do it yourself                    | Or ask the agent                |
| ---------------------- | --------------------------------- | ------------------------------- |
| Words on the screen    | Styles tab, **Content**, **Text** | "Change the text that says…"    |
| How text looks         | Styles tab, **Typography**        | "Make the line… semibold"       |
| An icon                | **Content**, **Icon**, **Change** | "Replace the icon… with a cart" |
| Remove something       | Component Tree, **Delete**        | "Remove the line at the bottom" |
| The whole app's colors | **Themes & Design**, **Colors**   | "Change the primary color to…"  |
| How the app works      | In the code, if you write code    | "Show how many items are left…" |

We'd reach for the visual tools when we know exactly what we want and can point at it, since a click is faster than a prompt and the result is exactly what we picked. We'd ask the agent for anything that changes how the app works, for changes spread across many screens, and for things that are easier to describe than to find, like "the line at the bottom".

## What to build next

You've built an app, tested it, changed it twice, and saved it. From here, pick whichever fits what you want to make:

- **Make your own version.** Use the description pattern from step 3 for another one-screen list, such as a packing list or a reading list, and run the same checklist on it.
- **Start from a template.** Our [mobile app templates](/mobile-app-templates/) are React Native and Expo apps you can open in Draftbit and change by chatting or by editing screens, the same way you did here.
- **Add a backend.** When you need sign-in or data that's shared between people, add a [Supabase backend](https://docs.draftbit.com/features/supabase/) to the project, and ask the agent to move your data there.
- **Share it.** A working preview isn't published yet. A [share page](https://docs.draftbit.com/features/publishing/#share-page) gives people a link to try your app in their browser, without a Draftbit account, and it works on the Free plan.

If you don't have an account yet, you can [start building free](/signup/).
