# react-inline-frame

> React iframe component

Latest version **0.0.6** (published 2018-06-03) · MIT license · 0 weekly downloads

## Install

```sh
npm install react-inline-frame
pnpm add react-inline-frame
yarn add react-inline-frame
bun add react-inline-frame
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.6 |
| Published | 2018-06-03 |
| First published | 2018-04-12 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 19.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Qingrong Ke |
| Maintainers | dearke |
| Keywords | iframe, react |

## Links

- npm: https://www.npmjs.com/package/react-inline-frame
- Repository: https://github.com/keqingrong/react-iframe
- Homepage: https://github.com/keqingrong/react-iframe#readme
- Issues: https://github.com/keqingrong/react-iframe/issues
- npm.io page: https://npm.io/package/react-inline-frame

## Dependencies (1)

- [iframe-utils](https://npm.io/package/iframe-utils.md) ^0.0.6

## Alternatives

- [mobx-react](https://npm.io/package/mobx-react.md) — 2.8M weekly downloads
- [rc-tree](https://npm.io/package/rc-tree.md) — 2.6M weekly downloads
- [@react-oauth/google](https://npm.io/package/@react-oauth/google.md) — 1.3M weekly downloads
- [@wagmi/connectors](https://npm.io/package/@wagmi/connectors.md) — 877.0K weekly downloads
- [vee-validate](https://npm.io/package/vee-validate.md) — 836.4K weekly downloads

## Recent versions

- 0.0.6 (latest) — 2018-06-03
- 0.0.5 — 2018-06-03
- 0.0.4 — 2018-06-03
- 0.0.3 — 2018-06-03
- 0.0.1 — 2018-04-12

## README

# react-inline-frame

[![npm version](https://img.shields.io/npm/v/react-inline-frame.svg)](https://www.npmjs.com/package/react-inline-frame)

> React iframe component

## Installation

```sh
npm install react-inline-frame
```

## Usage

```js
import React from "react";
import ReactIframe from "react-inline-frame";

class ReactIframeDemo extends React.Component {
  onIframeLoad = event => {
    console.log("onIframeLoad");

    this.iframe.postMessage({
      type: "greeting",
      content: ["Hello", "Bonjour", "你好"]
    });
  };

  onIframeMessage = (message, event) => {
    console.log("onIframeMessage", message);
  };

  render() {
    return (
      <ReactIframe
        className="iframe-demo"
        title="iframe-demo"
        src="./embed.html"
        ref={el => {
          this.iframe = el;
        }}
        onLoad={this.onIframeLoad}
        onMessage={this.onIframeMessage}
      />
    );
  }
}
```

## License

MIT

---
_Source: https://npm.io/package/react-inline-frame · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
