# iframe-react

> iframe-react React component

Latest version **1.0.1** (published 2018-02-04) · MIT license · 0 weekly downloads

## Install

```sh
npm install iframe-react
pnpm add iframe-react
yarn add iframe-react
bun add iframe-react
```

## Health

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

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.1 |
| Published | 2018-02-04 |
| First published | 2018-02-04 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Airam Rguez |
| Maintainers | airam |
| Keywords | react-component |

## Links

- npm: https://www.npmjs.com/package/iframe-react
- Homepage: http:
- npm.io page: https://npm.io/package/iframe-react

## Dependencies (1)

- [prop-types](https://npm.io/package/prop-types.md) ^15.6.0

## Recent versions

- 1.0.1 (latest) — 2018-02-04
- 1.0.0 — 2018-02-04

## README

# iframe-react

[![npm package][npm-badge]][npm]

Simple `iframe` for React.

## Install

```sh
npm i iframe-react -S
```

## Simple Example

```js
import React, { Component } from 'react';
import Frame from 'iframe-react';

class FrameExample extends Component {
  render() {
    return (
      <Frame
        title="iFrame example"
        style={{
          border: 'none',
          width: '100%',
          height: '100%',
        }}
      >
        <h1>iframe-react Demo</h1>
        <p>A simple example</p>
      </Frame>
    );
  }
}
```

## Props

* `title`: iFrame title.
* `head`: Pass script, style, ... tags inside the head prop. You can wrap them inside a `<Fragment>` component or use an array.
* `frameRef`: a callback to get a reference to the iframe element.
* `documentRef`: a callback to get a reference to the iframe document element.

See a detailed example under the demo directory.

## MIT Licensed

[npm-badge]: https://img.shields.io/npm/v/iframe-react.svg?style=for-the-badge
[npm]: https://www.npmjs.com/package/iframe-react

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