✔ Toggles relevant aria attributes on open and close
✔ Closes modal on overlay click
✔ Closes modal on pressing the
✔ Traps tab focus within the modal
✔ Focuses on the first focusable element within the modal
✔ Retains the focused element state after closing the modal
Micromodal follows the standardjs coding standard and is part of
- Clone Github repo
$ git clone https://github.com/ghosh/micromodal.git
yarnpackage manager (Read installation guide)
yarn installin the root folder to install all dependencies
yarn devto start a dev server. This serves the example directory and live reloads when any files are changed
yarn buildto build the files for distribution. This is run automatically as a pre-commit hook as well.
- Send pull request and chill
Feel free to read the related material here.
Or if you want to get more of neat JS projects to explore – check our new JS digest from March 13!