# dw-neit-rc-component-portal

> React Portal Component

Latest version **1.1.2** (published 2024-08-15) · MIT license · 0 weekly downloads

## Install

```sh
npm install dw-neit-rc-component-portal
pnpm add dw-neit-rc-component-portal
yarn add dw-neit-rc-component-portal
bun add dw-neit-rc-component-portal
```

## Health

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

Positive: has types; esm support; no vulnerabilities; high quality score.

Warnings: low downloads.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.1.2 |
| Published | 2024-08-15 |
| First published | 2024-08-15 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Node | >=8.x |
| Dependencies | 3 |
| Unpacked size | 26.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | smith3816@gmail.com |
| Maintainers | darewaynpm |
| Keywords | react, react-component, react-portal |

## Links

- npm: https://www.npmjs.com/package/dw-neit-rc-component-portal
- npm.io page: https://npm.io/package/dw-neit-rc-component-portal

## Dependencies (3)

- [classnames](https://npm.io/package/classnames.md) ^2.3.2
- [@babel/runtime](https://npm.io/package/@babel/runtime.md) ^7.18.0
- [dw-neit-rc-util](https://npm.io/package/dw-neit-rc-util.md) ^5.24.4

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

- 1.1.2 (latest) — 2024-08-15

## README

# rc-portal

React 18 supported Portal Component.

[![NPM version][npm-image]][npm-url] [![dumi](https://img.shields.io/badge/docs%20by-dumi-blue?style=flat-square)](https://github.com/umijs/dumi) [![build status][github-actions-image]][github-actions-url] [![Codecov][codecov-image]][codecov-url] [![npm download][download-image]][download-url]

[npm-image]: http://img.shields.io/npm/v/rc-portal.svg?style=flat-square
[npm-url]: http://npmjs.org/package/rc-portal
[github-actions-image]: https://github.com/react-component/portal/workflows/CI/badge.svg
[github-actions-url]: https://github.com/react-component/portal/actions
[codecov-image]: https://img.shields.io/codecov/c/github/react-component/portal/master.svg?style=flat-square
[codecov-url]: https://app.codecov.io/gh/react-component/portal
[download-image]: https://img.shields.io/npm/dm/rc-portal.svg?style=flat-square
[download-url]: https://npmjs.org/package/rc-portal

## Development

```bash
npm install
npm start
open http://localhost:8000
```

## Feature

- React life cycle support portal component

## Install

[![rc-portal](https://nodei.co/npm/rc-portal.png)](https://npmjs.org/package/rc-portal)

## Usage

```js | pure
import Portal from 'rc-portal';

const Demo = () => {
  return <Portal open>Hello World</Portal>;
};

export default Demo;
```

## 🔥 API

We use typescript to create the Type definition. You can view directly in IDE. But you can still check the type definition [here](https://github.com/react-component/portal/blob/master/src/interface.ts).

### Portal

| Prop         | Description                        | Type                     | Default       |
| ------------ | ---------------------------------- | ------------------------ | ------------- |
| getContainer | Customize portal container element | Element \| () => Element | document.body |
| open         | Show the portal                    | boolean                  | false         |
| autoLock     | Lock screen scroll when open       | boolean                  | false         |

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