Skip to content

2.0.0

Latest

Choose a tag to compare

@robbestad robbestad released this 01 Sep 12:53
· 6 commits to main since this release

A typed, ref-forwarding iframe wrapper for React 18 and 19.

Breaking

  • Requires React 18+ (1.8.5 remains on npm for React 16/17)
  • Dual ESM/CJS with an exports map; types live in dist/
  • No object-assign runtime dependency
  • No default display: initial or allowFullScreen="allowFullScreen"
  • onLoad / onError use React event types

Fixes

  • sandbox strings are no longer split into characters
  • allowFullScreen honors the boolean and merges fullscreen into allow with semicolons (#139)
  • forwardRef to the real HTMLIFrameElement (#54, #43)
  • onLoad receives the synthetic event; onError is attached natively (#67)

Features

  • Native iframe attributes pass through (srcDoc, fetchPriority, credentialless, referrerPolicy, …)
  • srcDoc for inline HTML (#55)
  • useIframeMessage and postToIframe helpers

Full changelog: https://github.com/robbestad/react-iframe/blob/master/CHANGELOG.md