# react-minimalist-portal

> A minimalist portal for react

Latest version **2.3.1** (published 2018-05-24) · ISC license · 0 weekly downloads

## Install

```sh
npm install react-minimalist-portal
pnpm add react-minimalist-portal
yarn add react-minimalist-portal
bun add react-minimalist-portal
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.3.1 |
| Published | 2018-05-24 |
| First published | 2016-05-06 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 65.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 15 |
| Maintainers | leopradel |
| Keywords | react, portal |

## Links

- npm: https://www.npmjs.com/package/react-minimalist-portal
- Repository: https://github.com/pradel/react-minimalist-portal
- Homepage: https://github.com/pradel/react-minimalist-portal#readme
- Issues: https://github.com/pradel/react-minimalist-portal/issues
- npm.io page: https://npm.io/package/react-minimalist-portal

## Dependencies (1)

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

## 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

- 2.3.1 (latest) — 2018-05-24
- 2.3.0 — 2018-05-23
- 2.2.0 — 2018-05-06
- 2.1.1 — 2017-10-10
- 2.1.0 — 2017-09-27
- 2.0.0 — 2017-08-04
- 1.1.0 — 2017-05-14
- 1.0.8 — 2017-03-02
- 1.0.6 — 2016-08-04
- 1.0.5 — 2016-06-28
- 1.0.4 — 2016-06-28
- 1.0.3 — 2016-05-06
- 1.0.2 — 2016-05-06
- 1.0.1 — 2016-05-06
- 1.0.0 — 2016-05-06

## README

# react-minimalist-portal

A minimalist portal for react.
Create a new React tree in document.body to create modal etc ..
This package is compatible with react 15 and 16.

[![npm version](https://badge.fury.io/js/react-minimalist-portal.svg)](https://badge.fury.io/js/react-minimalist-portal)
[![npm](https://img.shields.io/npm/dm/react-minimalist-portal.svg)](https://www.npmjs.com/package/react-minimalist-portal)
[![Build Status](https://travis-ci.org/pradel/react-minimalist-portal.svg?branch=master)](https://travis-ci.org/pradel/react-minimalist-portal)
[![Coverage Status](https://coveralls.io/repos/github/pradel/react-minimalist-portal/badge.svg?branch=master)](https://coveralls.io/github/pradel/react-minimalist-portal?branch=master)

## Usage

```javascript
import React from 'react';
import Portal from 'react-minimalist-portal';

export default class App extends React.Component {
  render() {
    return (
      <Portal>
        <p>I am in document body.</p>
      </Portal>
    );
  }
}

// If you want to render the portal inside your own container
const container = document.getElementById('my-custom-container-id');

export default class App extends React.Component {
  render() {
    return (
      <Portal container={container}>
        <p>I am in my-custom-container-id.</p>
      </Portal>
    );
  }
}
```

## Props

- `container` - optional - You can specify a container prop which should be of `Element` type. The portal will be rendered inside that element. The default behavior will create a div node and render it at the at the end of `document.body`.

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