From Thought to UI in Seconds: Meet OpenUI!

Picture by Creator | Canva
I’ll begin with a easy instance. Many occasions, I’ve imagined a gown that may look wonderful, however once I really discovered one thing related, it didn’t prove as anticipated. This isn’t only a private downside — it occurs in coding too. A shopper might think about a UI that appears nice of their head, however when it’s constructed, it doesn’t look as anticipated. The draw back? Time and sources wasted, together with potential shopper dissatisfaction.
Fortunately, this downside now has an answer. Weights & Biases (W&B) has developed OpenUI, an open-source instrument that turns your creativeness right into a prototype utilizing easy English instructions. UI creation turns into quick, enjoyable, and versatile. You may also convert the designs into code for frameworks like React, Svelte, or Internet Parts. For instance, I can say, “Create a dark-themed dashboard with a sidebar and charts,” and OpenUI will generate it dwell. You may also edit it utilizing easy English instructions.
On this article, we’ll discover why OpenUI issues, the way it works, and the way you should utilize it to create wonderful UIs in seconds.
Why OpenUI?
- Pure Language UI Creation: You don’t need to be a professional coder to get began. Simply describe what you need, and OpenUI does the remainder.
- See Adjustments Reside: As you alter your description, the UI updates immediately—much like a dwell preview in internet growth, however with out manually writing or enhancing code.
- Versatile Output: When you’re joyful together with your design, you’ll be able to convert it into code for fashionable frameworks, making it straightforward to make use of in actual tasks.
- Open Supply: It is free to make use of, and the group can contribute to enhancements.
How Does OpenUI Work?
There’s no rocket science behind the implementation, however the concept is sensible—and you could possibly even construct one thing related your self! It makes use of language fashions like these from OpenAI, Groq, or open-source choices like Ollama to know descriptions and generate HTML code. From there, you’ll be able to edit, refine, or convert it into the framework of your selection.
Getting Began with OpenUI
Let’s strive it out. You will have a number of choices relying in your setup, however don’t fear—we’ll preserve it easy!
Choice 1: Strive the Reside Demo
The best method to discover OpenUI is thru its dwell demo at OpenUI Demo. Simply log in together with your GitHub account. For instance, I requested it to generate a UI for “A pink card with a title and a button,” and right here’s what I obtained:

You possibly can toggle between mild and darkish mode, preview the UI on totally different screens, choose a theme, or make edits as wanted. Clicking the icon reveals the HTML code on your UI, as proven within the screenshot above.
Choice 2: Run It Domestically with Docker
If you wish to run OpenUI by yourself laptop, Docker supplies the best setup. It is rather like a pre-packaged field that accommodates all the things OpenUI must run. Right here’s how you are able to do it.
- Set up Docker: Obtain and set up Docker Desktop on your laptop (Home windows, Mac, or Linux).
- Get an API Key: OpenUI helps a number of fashions (OpenAI, Groq, Anthropic, Gemini, Cohere, Mistral, and many others.). I’ll use an OpenAI API key. Join a free key and put it aside.
- Run the Command: Open your terminal and paste this:
- Open Your Browser: As soon as it’s prepared, go to http://localhost:7878, and you can begin creating UIs identical to within the dwell demo.
(Change xxx together with your API key):
export OPENAI_API_KEY=xxx
docker run --rm --name openui -p 7878:7878 -e OPENAI_API_KEY ghcr.io/wandb/openui
It should take a number of moments to obtain.

Choice 3: Run from Supply (For the Curious)
If you wish to run OpenUI from its supply code, you want Git and uv (a quick Python bundle supervisor).
- Clone the mission:
- Navigate to the folder:
- Sync dependencies and activate the digital surroundings utilizing:
- Arrange the surroundings and run it utilizing this command:
git clone https://github.com/wandb/openui
uv sync --frozen --extra litellm
supply .venv/bin/activate
export OPENAI_API_KEY=your_openai_key
python -m openui
Superior Setup Choices
Ollama Setup (For Open-Supply Fashions)
- Set up Ollama.
- Pull a mannequin (e.g., llava for picture assist):
- Run OpenUI with Ollama:
docker exec -it openui-ollama-1 ollama pull llava
docker run --rm --name openui -p 7878:7878 -e OLLAMA_HOST=http://host.docker.inside:11434 ghcr.io/wandb/openui
Wrapping Up
So, what are you ready for? Head over to the OpenUI GitHub web page, strive the demo, or set it up domestically. Describe, edit, and convert your method to superior UIs. Listed here are few extra ideas on your reference:
- The extra particulars you give (“a purple button with white textual content”), the higher the consequence
- Strive totally different descriptions and add complexity step by step to see what occurs
- Use widespread UI terminology when potential
- Click on the gear icon to change between AI fashions (like Groq for pace or Ollama for native use)
Kanwal Mehreen Kanwal is a machine studying engineer and a technical author with a profound ardour for information science and the intersection of AI with drugs. She co-authored the book “Maximizing Productiveness with ChatGPT”. As a Google Technology Scholar 2022 for APAC, she champions variety and educational excellence. She’s additionally acknowledged as a Teradata Range in Tech Scholar, Mitacs Globalink Analysis Scholar, and Harvard WeCode Scholar. Kanwal is an ardent advocate for change, having based FEMCodes to empower girls in STEM fields.