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.
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.
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.
How to use
- Visit onlook.com to download, or run locally:
git clone https://github.com/onlook-dev/onlook.git
cd onlook
npm install
npm run dev
- Open your existing React or Next.js project in Onlook.
- Select any component on the canvas to edit its styles, props, or layout visually. Changes write back to your source files.
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.
Related on TokRepo
- AI tools for design -- AI-powered design and prototyping tools
- AI tools for coding -- Code editors and AI coding assistants
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
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.
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.
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.
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.
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)
- Onlook GitHub— Onlook is an open-source visual editor for React and Next.js
- Onlook Repository— Apache-2.0 license with community contributors
- Onlook Website— Visual editing with real-time code synchronization
Related on TokRepo
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
Related Assets
Conda — Cross-Platform Package and Environment Manager
Install, update, and manage packages and isolated environments for Python, R, C/C++, and hundreds of other languages from a single tool.
Sphinx — Python Documentation Generator
Generate professional documentation from reStructuredText and Markdown with cross-references, API autodoc, and multiple output formats.
Neutralinojs — Lightweight Cross-Platform Desktop Apps
Build desktop applications with HTML, CSS, and JavaScript using a tiny native runtime instead of bundling Chromium.