# Onlook

> An open-source visual editor that lets you design Next.js + Tailwind apps in the browser, with AI chat and every edit written back to real code

- Category: App UIs & Builders / Low-Code & No-Code Builders
- Language: TypeScript
- Licence: Apache-2.0
- Repository: https://github.com/onlook-dev/onlook
- Website: https://onlook.com
- Canonical page: https://ai-tldr.dev/tools/onlook/

## In short

Onlook is an open-source visual editor that lets you design Next.js + Tailwind apps in the browser, with AI chat and every edit written back to real code. It sits in the Low-Code & No-Code Builders category of the App UIs & Builders tools and is open-source, written in TypeScript and licensed Apache-2.0.

## Overview

Onlook is an open-source, visual-first code editor for building websites, prototypes and app interfaces in Next.js and TailwindCSS. Instead of generating code you then read in a text editor, it renders your running app on a canvas and lets you edit it the way a designer would: select elements, drag them, change their Tailwind styles from a toolbar, and ask an AI chat to create or change pages. The README positions it as an open-source alternative to Bolt.new, Lovable, V0, Replit Agent, Figma Make and Webflow.

Under the hood, when you create an app Onlook loads its code into a web container that runs and serves it. The editor shows that preview in an iframe, reads and indexes the code, and instruments it so every element on screen maps back to its place in the source. When you edit an element, Onlook changes it in the iframe and then in the code; the AI chat has the same code access plus tools to understand and edit it. You can right-click any element to jump to its exact location in code.

The repository is the open-source editor (Next.js, tRPC, Supabase, Drizzle, the AI SDK with OpenRouter, CodeSandbox SDK sandboxes and Freestyle hosting), licensed Apache-2.0. The README notes that it works on Next.js + TailwindCSS projects only for now, and that the team's next hosted product for designers is in early access through a waitlist on onlook.com.

## What it does

- Create a Next.js app from a text prompt, an image or a prebuilt template, or import an existing Next.js + TailwindCSS project
- Figma-like visual editing on the live app: a layers browser, draw-in divs, drag-and-drop rearranging within parent containers, and a toolbar for Tailwind styles, text and layout
- Code stays in sync: a side-by-side real-time code editor, right-click to open an element's source location, and checkpoints to save and restore
- Brand assets and tokens, page creation and navigation, project image management, component detection and branching to experiment with designs
- AI chat with code access that can create or edit a project, with multiple messages queued at once
- Deploy with a sharable link or your own custom domain, and edit with teammates in real time

## Getting started

You can use the hosted app at onlook.com or run the editor yourself. Running locally needs Bun, Docker (for the Supabase backend) and Node.js 20.16.0 or later, plus a CodeSandbox API token, an OpenRouter key and a fast-apply key from MorphLLM or Relace. These steps follow the project's Running Locally guide.

1. Clone and install

```bash
git clone https://github.com/onlook-dev/onlook.git
cd onlook
bun install
```

2. Start the local backend

   This starts Supabase in Docker. Save the anon key and service role key it prints; the environment setup asks for them.

```bash
bun backend:start
```

3. Configure environment variables

   Have the Supabase keys and your CodeSandbox, OpenRouter and fast-apply (MorphLLM or Relace) API keys ready, then run the environment setup.

```bash
bun run setup:env
```

4. Create and seed the database

```bash
bun db:push
bun db:seed
```

5. Run the editor

   Open http://localhost:3000, then create a project from a prompt, image or template, or import a Next.js + TailwindCSS app. Use the AI chat to make changes, drag elements on the canvas, and right-click any element to see its code.

```bash
bun dev
```

## When to use it

- Reach for it when a designer wants to adjust layout, typography and colour on a real Next.js + Tailwind app without handing a mockup to an engineer
- Reach for it when you want a self-hostable, open-source alternative to prompt-to-app builders such as Bolt.new, Lovable or V0
- Reach for it when you prototype with AI but want every change to stay inspectable as React and Tailwind code you can open side by side
- Reach for it when you want to study or extend how a visual editor maps DOM edits back to JSX source
