TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Show HN: Puck (Visual Editor for React) now supports viewport switching

6 pointsby chrisvxdabout 1 year ago
We&#x27;ve been working hard to add viewport previewing to Puck, our MIT visual editor for React, over the last few months.<p>In order to get device-like viewport previewing with CSS media queries etc, you need to render your content within an iframe.<p>Drag-and-drop is a core part of Puck&#x27;s experience, but is famously difficult to pair with iframes.<p>We didn&#x27;t want to compromise Puck&#x27;s experience, so we released two new packages to support this effort:<p>1) @measured&#x2F;dnd, a fork the underlying dnd library (@hello-pangea&#x2F;dnd, a maintained fork of react-beautiful-dnd) to support both iframes and CSS transforms 2) @measured&#x2F;auto-frame-component, an iframe package that syncs the styles between the host and same-origin iframe.<p>The result is a seamless drag-and-drop experience across iframes with true viewport previewing that we&#x27;re very excited about!<p>Thank you to our wonderful contributors and the HN community for such great support!

no comments

no comments