Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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

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



);
};
```