Napoleon's Pixelated Mugshot
Learn about our RFC process, Open RFC meetings & more.Join in the discussion! »

react-portal-overlay

1.0.1 • 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>
  );
};

Install

npm i react-portal-overlay

DownloadsWeekly Downloads

235

Version

1.0.1

License

MIT

Unpacked Size

311 kB

Total Files

11

Last publish

Collaborators

  • avatar