Show HN: Onlook – Open-source, visual-first Cursor for designers (opens in a new tab)github.com
408 pointsWe launched Onlook [1][2] as a local-first Electron app almost a year ago. Since then, “prompt-to-build” tools have blown up, but none let you design and iterate visually. We fixed that by taking a visual-first, AI-powered approach where you can prompt, style, and directly manipulate elements in your app like in a design tool.
Two months ago, we decided to move away from Electron and rewrite everything for the browser. We wanted to remove the friction of downloading hundreds of MBs and setting up a development environment just to use the app. I wrote more here [3] about how we did it, but here are some learnings from the whole migration:
1. While most of the React UI code can be reused, mapping from Electron’s SPA experience to a Next.js app with routes is non-trivial on the state management side.
2. We were storing most of the data locally as large JSON objects. Moving that to a remote database required major refactoring into tables and more loading states. We didn’t have to think as hard about querying and load time before.
3. Iframes in the browser enforce many more restrictions than Electron webview. Working around this required us to inject code directly into the user project in order to do cross-iframe communication.
4. Keeping API keys secure is much easier on a web application than an Electron app. In Electron, every key we leave on the client can be statically accessed. Hence, we had to proxy any SDK we used that required an API key into a server call. In the web app, we can just keep the keys on the server.
5. Pushing a release bundle in Electron can take 1+ hours. And some users may never update. If we had a bug in the autoupdater itself, certain users could be “stranded” in an old version forever, and we’d have to email them to update. Though this is still better than mobile apps that go through an app store, it’s still very poor DX.
How does Onlook for web work?
We start by connecting to a remote “sandbox” [4]. The visual editing component happens through an iframe. We map the HTML element in the iframe to the location in code. Then, when an edit is made, we simulate the change on the iframe and edit the code at the same time. This way, visual changes always feel instant.
While we’re still ironing out the experience, you can already:
- Select elements and prompt changes
- Update TailwindCSS classes via the styling UI
- Draw in new divs and elements
- Preview on multiple screen sizes
- Edit your code through an in-browser IDE
We want to make it trivial for anyone to create, style, and edit codebases. We’re still porting over functionalities from the desktop app — layers, fonts, hosting, git, etc. Once that is done, we plan on adding support for back-end functionalities such as auth, database, and API calls.
Special thank you to the 70+ contributors who have helped create the Onlook experience! I think there’s still a lot to be solved for in the design and dev workflow, and I think the tech is almost there.
You can clone the project and run it from our repo (linked to this post) or try it out at https://beta.onlook.com where we’re letting people try it out for free.
I’d love to hear what you think and where we should take it next :)
[1] https://news.ycombinator.com/item?id=41390449
[2] https://news.ycombinator.com/item?id=40904862
[3] https://docs.onlook.com/docs/developer/electron-to-web-migra...
[4] Currently, the sandbox is through CodeSandbox, but we plan to add support for connecting to a locally running server as well
Comments (81) 28 threads
I’ve tried other visual AI dev tools like Bolt or Lovable, but I feel like the walled-garden approach they’ve taken is a bit limiting in terms of how I personally want to work. As someone who comes from design but is actively using Cursor and Windsurf, I’ve very much been missing that Webflow-like ability to just click, edit, and see things getting updated in real-time, while always knowing I can drop into the code for more complex stuff.
It looks like you’ve nailed this intersection. The fact that you’re taking what is basically a visual layer on top of the code, plus the inclusion of the in-browser code editor (and I assume terminal access for the sandbox eventually?), is a huge step in the right direction and feels like it could really cover some of that gap I want between design and dev.
I’m definitely keeping an eye on this, and when you’re able to allow import existing projects I'll be onboard.
Congrats on the launch!
It's been a challenge to find the right balance for this – on one hand you want to give people who know what code is an easy way to navigate their codebases and be more effective, and on the other hand you want to help people who have never coded before create something they really love.
The visual layer has a lot of polish left to do to be a perfect design tool experience, but we're getting there.
I think for most designers they don't love being limited by traditional web "structures" like flexbox, but that's also how things can get built and scale properly. AI is very good at generating flexbox styled websites but when a designer jumps-in to an AI generated website it's like picking up a complex project someone else has architected. If you know how websites work it isn't super intimidating, but if you don't then it can feel very overwhelming.
One of the main reasons we decided to not have layers and styles immediately visible on the left and right sides of the app was because people who have never jumped into a design tool mentioned they were overwhelmed with the UI. Moving these tools into a "secondary" interaction layer cleared up the interface but made it easy for pro-users to still find them.
I'm excited to keep refining this editor experience so when you're able to import projects you have all of the tools you'd expect from a visual editor for your codebase.
There is terminal access on the right of the bottom bar. It just has 1 CLI connection right now, along with the long runner server but you can run commands through there or through the AI.
Just merged a PR for that should be live in a few mins https://github.com/onlook-dev/onlook/pull/1963
This is great.
Next we need to win the foundation model game and steal it away from the hyperscalers.
Great job!
This should be your demo video on your home page instead of what you have. I didn't understand how you were different to a typical no-code tool until I saw the entire process of creating a react app, running it and actually changing stuff on the Onlook console.
Thanks for mentioning it!
https://github.com/onlook-dev/onlook/pull/2009
Few points:
- At first it generated a bunch of code and got a build error. But the "Fix error" button did indeed fix it.
- In Preview mode I can't scroll. Works fine in Design mode.
- I can't seem to actually see any element's code; all I have is a basic layout.tsx file
- Is there pricing information anywhere? I did not see any.
It's actually attempting to scroll the inner web page in Preview mode. Perhaps this is not a great/obvious form factor since we've had others be confused about this. I think showing a scroll bar in design mode or animate when overscrolled in Preview mode to show it's attempting to scroll could help.
> Is there pricing information anywhere? I did not see any.
There's no rate limit or pricing for the web beta at the moment but for the desktop app the pricing is shown in-app. We have a WIP pricing page that you can find in code but needs some work before we release it.
> I can't seem to actually see any element's code; all I have is a basic layout.tsx file
This seems wrong, I will take a look. The code should be highlighted in the editor when you click on an element. It's possible that it put all the code in layout.tsx but there should be a page.tsx in there.
I'm super fired up about this new version of Onlook for two reasons:
1) It makes it so much easier to jump in and start designing and
2) We have a much more intuitive, simplified toolbar control for styles that makes it even easier to craft your designs.
This has been the third major version of Onlook, and each time has felt like a leap towards solving the gap between design and development. Our first product was a Chrome Extension, the second was a downloadable desktop app (Onlook Studio), and now we're releasing Onlook for Web.
For all of the designers and non-technical people that just need a way to share their ideas with their engineering colleagues, the beta of this web version is a great start. But our goal continues be to truly solve the gap, so we'll be adding tons of great features that will let you go beyond ideation to actual implementation on real codebases.
Some known bugs:
– Sometimes generations don't "apply" after they're loaded: Kiet is working on a fix for this, but try clicking on the blank-template and re-prompting your change.
- It can take a long time to load the AI chat: We're working on making this faster (or at least a little more entertaining).
- Sometimes nothing shows up in the chat: Try going back to the homepage and re-prompting. This is something we want to make smoother.
– Sometimes styles don't apply: Let us know! We're trying to catch the edge cases.
Thank you all for your help and patience as we work through this early preview. Please join us on our Discord [https://discord.gg/ZZzadNQtns] and report any bugs or issues on GitHub repo: https://github.com/onlook-dev/onlook
All comments shown.
Couldn't load more comments. Check your connection and try again.