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
exportsmap; types live indist/ - No
object-assignruntime dependency - No default
display: initialorallowFullScreen="allowFullScreen" onLoad/onErroruse React event types
Fixes
sandboxstrings are no longer split into charactersallowFullScreenhonors the boolean and mergesfullscreenintoallowwith semicolons (#139)forwardRefto the realHTMLIFrameElement(#54, #43)onLoadreceives the synthetic event;onErroris attached natively (#67)
Features
- Native iframe attributes pass through (
srcDoc,fetchPriority,credentialless,referrerPolicy, …) srcDocfor inline HTML (#55)useIframeMessageandpostToIframehelpers
Full changelog: https://github.com/robbestad/react-iframe/blob/master/CHANGELOG.md