react-a11y-modal

1.1.4 • Public • Published

react-a11y-modal

Build Status NPM code style: prettier

An accessible & customizable modal dialog for React built with Hooks under the hood. It provides developers a decent-looking modal which they can use right away without worrying much about styling. However, if you need custom styles it's of course possible.

Contents 📖

Installation ⚒

Use either npm or yarn:

npm install --save react-a11y-modal
yarn add react-a11y-modal
 

Usage 🤔

There are plenty of props available, which you can pass to <Modal.Container />.

Basic modal

import { Modal } from 'react-a11y-modal';
 
<Modal.Container>
  <h1>Title</h1>
  <button>Close</button>
</Modal.Container>;

Header, Body and Footer

import { Modal } from 'react-a11y-modal';
 
<Modal.Container>
  <Modal.Header>
    <h1>Title</h1>
    <button>Close</button>
  </Modal.Header>
  <Modal.Body>
    <p>Body</p>
  </Modal.Body>
  <Modal.Footer>
    <button>Footer button</button>
  </Modal.Footer>
</Modal.Container>;

Docs 🤓

For detailed documentation there is this page with everything you need to know.

Demos 💡

Accessibility ♿️

react-a11y-modal was designed to follow the W3C Specification.

License 🔓

MIT © pixelmanya

Package Sidebar

Install

npm i react-a11y-modal

Weekly Downloads

2

Version

1.1.4

License

MIT

Unpacked Size

1.15 MB

Total Files

7

Last publish

Collaborators

  • pixelmanya