Turn the internet into your component library with our HTML to React browser extension.
Convert snippets of any website into a React component. Use the Magic Patterns editor to customize and iterate. Export to code or Figma.
๐ Hey Product Hunt!
It's been almost exactly a year since we launched our first product in the design tooling space. Over this time, we noticed a common workflow: Copying existing design patterns to code or Figma, and then customizing them to your own product.
We would constantly see folks with a website pulled up side-by-side with their IDE or Figma slowly recreating websites manually... we figured there had to be a better way. Introducing HTML to React.
Here's how it works:
1. Enable the HTML to React browser extension
2. Select the element on the page you want to copy
3. Boom! You get the React code that is also exportable to Figma
4. You can further use the Magic Patterns editor to further customize + edit the component with AI
Let us know what you think โ we're shipping new versions every week and would love to build for you!
- Teddy & Alex
Report
@teddyni Congratulations on the launch! ๐ The HTML to React tool looks impressive. I'm curious about how it handles responsive design elements and if it adapts to various screen sizes when converting HTML to React. Also, are there plans to integrate support for additional frameworks or design tools in the future?
@devindsgbyq thanks Devin! Thatโs a great q - the long answer short is it depends on how the website implements their responsiveness.
If the website uses CSS to natively handle responsiveness, our extension will capture it! But if the site is using JavaScript, we unfortunately donโt have a way now to get multiple viewports.
We definitely want to support more down the line - any frameworks or tools youโre thinking of in particular?
@crebuh You can currently convert the code to Tailwind using our AI! We don't have current plans to support Angular, but we have customers who use us in conjunction with ChatGPT to convert our React code into Angular!
@teddyni@crebuh thanks christofer!
We already support Tailwind in the sense that you can 'convert' the grabbed HTML to any component library, such as Shadcn, Chakra, or just plain ol' Tailwind!
Angular.. some day! With AI anything it's possible. We view the Chrome Extension as a 'starting point' and AI helps you edit and make it your own.
I'm always looking at sites for inspiration and have wanted to be able to re-create my favorites, so I'm very excited to give this a try! I have a feeling that this + Cursor will be GOATed for any front-end work I need to do.
Oh Noice! Interesting examples from Stripe and Linear there too @teddyni and @alexdanilowicz.
Have done this at times to start off with a base but automating it makes so much sense. Also, the feature of converting to Chakra shows how deep you have understood the problem.
Congrats on the launch! โจ๐
@alexdanilowicz@akigugale Two of our favorite websites :)
Being able to convert it to your design system of choice is one of our favorite pieces โ makes the code actually usable in your codebase!
Report
Nice. Any way to convert tailwind to webflow or figma?
@nifal_adam2 Hey yes! Thereโs a โconvertโ button in the top right corner that will take the HTML and computed styles and turn it into any design system you want, including Tailwind!
Hearing from our customers what they have already created with the extension has been incredible... so we can't wait to see what you all build!
Some of my favorite use cases:
- getting design inspiration from your favorite website and then making it their own with our 'convert' feature
- need to build a complex UI, but using the extension to get to a starting point faster (why reinvent the wheel?)
It's pretty interesting how we do it technically, too. We grab the HTML and computed styles on the page and then deterministically turn it into JSX. There's no AI involved, actually, until you start editing with natural language or hit the 'convert to your component library' button! It was cool building something 'the classic way' (without AI), but then adding it on as a feature afterward.
So let us know: what are you using the Magic Patterns HTML to React extension for?
Report
HTML to React sounds super handy. Just checked out the demo, and it looks really promising.
Hey Teddy,
Can you give an example of the kind of tweaks it can make to the components?
How does the Figma export handle more complex layouts or responsive designs?
Congrats on the launch!
@kyrylosilin Hey Kyrylo! Yeah absolutely โ
Some example tweaks would be:
- Making a light mode design into dark mode
- Changing copy
- Adding sections, removing sections, editing sections
Honestly, you can really tweak anything you want โ our AI is pretty powerful so it'll try its best to do whatever you ask it!
RE: Complex layouts + responsive designs in Figma โ we unfortunately don't natively handle responsive designs in Figma, but it'll be able to handle complex layouts. A pro tip would be to use our import, and then use Figma's auto-auto layout feature to convert everythign to autolayout which should get you ALMOST to responsiveness!
Report
I will recommend Magic Patterns to our team's front-end developers and designers. I hope they'll thank me for it!
Replies
Magic Patterns
Magic Patterns
Mailfox
Magic Patterns
Magic Patterns
Web Action SDK
Magic Patterns
Magic Patterns
Magic Patterns
Magic Patterns
Magic Patterns
Magic Patterns
Magic Patterns
Magic Patterns
Magic Patterns
Telebugs
Magic Patterns
Magic Patterns