Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/madeleineostoja/react-portal-overlay
Lightweight fullscreen overlays using React portals
https://github.com/madeleineostoja/react-portal-overlay
modal overlay react react-overlay react-portal
Last synced: 3 months ago
JSON representation
Lightweight fullscreen overlays using React portals
- Host: GitHub
- URL: https://github.com/madeleineostoja/react-portal-overlay
- Owner: madeleineostoja
- License: mit
- Created: 2020-05-16T01:45:50.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2021-07-14T05:00:06.000Z (over 3 years ago)
- Last Synced: 2024-10-12T00:35:45.340Z (4 months ago)
- Topics: modal, overlay, react, react-overlay, react-portal
- Language: TypeScript
- Homepage: https://madeleineostoja.github.io/react-portal-overlay/
- Size: 1.88 MB
- Stars: 13
- Watchers: 2
- Forks: 8
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# React Portal Overlay
[![NPM](https://img.shields.io/npm/v/react-portal-overlay)](https://www.npmjs.com/package/react-portal-overlay) [![License](https://img.shields.io/npm/l/react-portal-overlay)](https://github.com/seaneking/react-portal-overlay/blob/master/LICENSE.md)
A lightweight and performant fullscreen overlay component using React portals to render anywhere you need them to
## Installation
```sh
npm i react-portal-overlay
```## Usage
See the [API Docs](https://madeleineostoja.github.io/react-portal-overlay/) for a full overview of props and options.
```js
import React, { useState } from 'react';
import { Overlay } from 'react-portal-overlay';export default () => {
const [open, setOpen] = useState(false);return (
setOpen(false)}>
My overlay
);
};
```