RE

React Modal

react-modal

Accessible modal dialog component for React.JS

Component Libraries
react
react-component
modal
dialog
react-modal
Component Libraries
javascript
npm
frontend
open source
Stars
7.4k
Weekly
2.4M
Open issues
212
Bundle
~25 kB

Installation

npm install react-modal

Code example

import { Button } from "react-modal";

export function Example() {
  return (
    <div className="flex gap-2">
      <Button>Primary</Button>
      <Button variant="outline">Secondary</Button>
    </div>
  );
}

Pros & cons

Pros

  • Actively maintained by diasbruno
  • 2.4M weekly downloads. Battle tested
  • MIT licensed

Considerations

  • Adds roughly ~25 kB to your bundle
  • Needs client-only rendering in SSR frameworks
  • Not supported in React Native
  • 212 open issues on GitHub

FAQs

Alternatives & similar libraries