react-portal-overlay
TypeScript icon, indicating that this package has built-in type declarations

1.1.0 • Public • Published

React Portal Overlay

NPM License

A lightweight and performant fullscreen overlay component using React portals to render anywhere you need them to

Installation

npm i react-portal-overlay

Usage

See the API Docs for a full overview of props and options.

import React, { useState } from 'react';
import { Overlay } from 'react-portal-overlay';

export default () => {
  const [open, setOpen] = useState(false);

  return (
    <Overlay open={open} onClose={() => setOpen(false)}>
      <h1>My overlay</h1>
    </Overlay>
  );
};

Dependencies (2)

Dev Dependencies (30)

Package Sidebar

Install

npm i react-portal-overlay

Weekly Downloads

835

Version

1.1.0

License

MIT

Unpacked Size

312 kB

Total Files

11

Last publish

Collaborators

  • madeleineostoja