0.5.3 • Published 4 months ago

makeup-modal v0.5.3

Weekly downloads
25
License
MIT
Repository
-
Last release
4 months ago

makeup-modal

Sets an element to a modal state using makeup-keyboard-trap and makeup-screenreader-trap. All other elements become "inert".

Experimental

This module is still in an experimental state, until it reaches v1 you must consider all minor releases as breaking changes.

import * as modal from "makeup-modal";

// set an element to modal
modal.modal(document.querySelector("el"));

// reset the element to non-modal
modal.unmodal();

Install

npm install makeup-modal

Options

  • useHiddenProperty: use hidden property for inert content instead of aria-hidden (useful for fullscreen modals) (default: false)
  • hoist: moves the element to the document root (default: false)
  • wrap: if element is at document root, wraps all "inert" sibling elements into a single container (default: false)

Events

  • makeup-modal
  • makeup-unmodal
0.5.3

4 months ago

0.5.2

5 months ago

0.5.1

5 months ago

0.5.0

8 months ago

0.4.2

8 months ago

0.4.1

3 years ago

0.4.0

3 years ago

0.3.0

4 years ago

0.2.1

4 years ago

0.2.0

4 years ago

0.1.3

5 years ago

0.1.2

5 years ago

0.1.0

6 years ago

0.0.4

7 years ago

0.0.3

7 years ago

0.0.2

7 years ago

0.0.1

8 years ago