Skip to content
R

react-modal

Accessible modal dialog component for React

by reactjsFree

#10in UI Libraries
0In stores

Description

react-modal is an accessible modal dialog component for React, maintained in the reactjs organization on GitHub. It renders a dialog above t…

Highlights

  • Accessible modal dialog for React
  • Install with npm or yarn
  • Usable from a React app loaded via CDN
  • Callbacks such as onRequestClose
  • Style with inline styles or CSS classes
  • Runnable examples and CodePen demos

Ratings & Reviews

No ratings yet

Be the first to rate react-modal.

People also visit

R

react-aria-modal

A fully accessible

UI Libraries
Launch
R

react-bootstrap-modal

React Bootstrap Modal ===================================

UI Libraries
Launch
R

react-native-use-modal-hooks

React hooks for displaying a modal window in React Native

UI Libraries
Launch
R

@rc-component/portal

React Portal Component

UI Libraries
Launch
R

react-skylight

A react component for modals and dialogs

UI Libraries
Launch
F

focus-trap-react

A React component that traps focus

UI Libraries
Launch

react-modal FAQ

What is react-modal?

It is a React component that shows content in a modal dialog on top of the page. The project describes it as an accessible modal dialog component for React.

How do I install it?

Run npm install --save react-modal, or yarn add react-modal.

Can I use it without a bundler?

Yes. The README describes adding it to a React app that loads React from CDN scripts, using a script tag placed after the React scripts.

Where can I see examples?

The repository has an examples directory you can run with npm start or yarn run start. CodePen demos cover a minimal dialog, setAppElement, onRequestClose, shouldCloseOnOverlayClick, inline styles and CSS classes.

Where is the documentation?

The main documentation is a reference book that describes the API and gives examples of its use, linked from the project's README.

What are the best react-modal alternatives?

Popular alternatives to react-modal include react-aria-modal, react-bootstrap-modal and react-native-use-modal-hooks. See all react-modal alternatives

Developer Stuff

Badges