Skills2026年4月9日·1 分钟阅读

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.

Agent 就绪

先审查再安装

这个资产需要先审查。复制的指令会要求 Agent dry-run、列出写入项,确认后再继续。

Needs Confirmation · 66/100策略:需确认
Agent 入口
任意 MCP/CLI Agent
类型
Skill
安装
Single
信任
信任等级:Established
入口
step-1.md
先审查命令
npx -y tokrepo@latest install 0d4f9803-33e3-11f1-9bc6-00163e2b0d79 --target codex

先 dry-run,确认写入项后再运行此命令。

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.

常见问题

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.

引用来源 (3)
🙏

来源与感谢

Created by Onlook Dev. Licensed under Apache-2.0.

Onlook — ⭐ 25,000+

讨论

登录后参与讨论。
还没有评论,来写第一条吧。

相关资产