ScriptsApr 9, 2026·3 min read

Onlook — Visual AI Code Editor for React Apps

Open-source Figma-like visual editor for building React and Next.js apps with AI. Edit visually and code syncs in real-time. Design branching, team collab, deploy. Apache-2.0, 25,000+ stars.

TL;DR
Onlook is an open-source visual editor for React and Next.js that syncs edits to code in real-time with AI assistance.
§01

What it is

Onlook is an open-source visual editor for building React and Next.js applications. It works like Figma but directly manipulates your source code. When you drag, resize, or restyle a component visually, the corresponding JSX and CSS update in real-time. AI features assist with generating components and layouts from natural language.

Onlook is for frontend developers and designers who want to iterate on UI without constantly switching between a design tool and a code editor. It is also useful for non-technical team members who need to make visual adjustments without writing code.

§02

How it saves time or tokens

Visual editing eliminates the guess-and-check cycle of CSS changes. Instead of writing margin values, saving, reloading, and adjusting, you drag elements directly. The code updates are written back to your actual source files, not a separate design artifact.

Design branching lets teams experiment with UI variations without creating git branches for every experiment. This reduces context-switching overhead for both designers and developers.

§03

How to use

  1. Visit onlook.com to download, or run locally:
git clone https://github.com/onlook-dev/onlook.git
cd onlook
npm install
npm run dev
  1. Open your existing React or Next.js project in Onlook.
  1. Select any component on the canvas to edit its styles, props, or layout visually. Changes write back to your source files.
§04

Example

Using Onlook's AI to generate a component:

Prompt: 'Create a pricing card with three tiers,
         monthly/annual toggle, and a highlight
         on the middle tier'

Onlook generates:
- PricingCard.tsx component
- Tailwind CSS classes
- Responsive breakpoints

The generated code appears in your project directory as actual source files, not a preview.

§05

Related on TokRepo

§06

Common pitfalls

  • Expecting Onlook to work with non-React frameworks. Currently it supports React and Next.js only. Vue, Svelte, and Angular are not supported.
  • Using Onlook on a project with heavy runtime-generated styles (CSS-in-JS with dynamic values). Static Tailwind and CSS modules work best with visual editing.
  • Forgetting to commit Onlook's code changes. The tool writes directly to your source files, so uncommitted changes can be lost if you reset your git working directory.

Frequently Asked Questions

Does Onlook work with existing React projects?+

Yes. Point Onlook at your existing React or Next.js project directory and it renders your app in a visual canvas. You can edit any component's styles and layout visually, and changes are written back to your source files.

Is Onlook free and open source?+

Yes. Onlook is licensed under Apache-2.0 and available on GitHub. The core visual editor and AI features are free. The project has community contributors and active development.

How does Onlook handle version control?+

Onlook writes changes directly to your source files, so standard git workflows apply. It also supports design branching, which lets you create visual experiments as separate branches without manually managing git.

Can non-developers use Onlook to edit React apps?+

Yes, for visual changes like colors, spacing, typography, and layout. Non-developers can adjust these properties without understanding JSX or CSS syntax. Logic changes (event handlers, data fetching) still require code.

What AI features does Onlook include?+

Onlook uses AI to generate React components from natural language descriptions, suggest layout improvements, and auto-apply design system tokens. The AI writes standard React code, not proprietary formats.

Citations (3)
🙏

Source & Thanks

Created by Onlook Dev. Licensed under Apache-2.0.

Onlook — ⭐ 25,000+

Thanks to the Onlook team for bridging the gap between design and code.

Discussion

Sign in to join the discussion.
No comments yet. Be the first to share your thoughts.

Related Assets