Description
react-aria-modal is a React modal component built to follow the WAI-ARIA Authoring Practices. It provides a minimally styled container that wraps your own presentational component, so you control the content and the look. Out of the box, it traps focus inside the modal so that Tab and Shift+Tab cycle through its focusable elements, closes on Escape, freezes scrolling on the page underneath, and returns focus to the element that was focused before the modal opened. The dialog has an ARIA role of dialog or alertdialog and an accessible title through aria-label or aria-labelledby. Clicking the underlay closes the modal by default, which can be turned off, and the modal is appended to the end of the document body. The project's goals are full accessibility, maximum flexibility and absolutely minimal styling. It is built on focus-trap-react, no-scroll and react-displace, and the readme points to related libraries such as react-aria-menubutton and react-aria-tabpanel. The project is on GitHub, and its readme says it is seeking co-maintainers to continue development.…
Highlights
- Focus trapped inside the modal
- Escape to close and scroll locking
- Focus returns to the trigger when closed
- Minimal styling, so you style the dialog yourself
Ratings & Reviews
No ratings yet
Be the first to rate react-aria-modal.
People also visit
react-aria-modal FAQ
What is react-aria-modal?
A React modal component that follows WAI-ARIA practices, with focus trapping, Escape to close and scroll locking.
Does it come with styles?
Only minimal inline styles needed to work. The readme says you style the dialog yourself.
Which React versions does it support?
The readme says version 2 and later are compatible with React versions after 0.14, and version 1 with React 0.13.
Can the modal close on an outside click?
Yes, by default a click on the underlay closes it, and you can disable that.
Is it still maintained?
The readme says it is seeking co-maintainers, because continued development needs dedicated people.
Is it free?
The listing shows it as free.
What are the best react-aria-modal alternatives?
Popular alternatives to react-aria-modal include react-modal, focus-trap-react and react-bootstrap-modal. See all react-aria-modal alternatives




















