1.1.9 • Published 2 years ago

@jdthornton/animated-modal v1.1.9

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

@jdthornton/animated-modal

npm (scoped) npm bundle size (minified)

React animated modal component.

Demo

https://jdthornton.github.io/#/animated-modal

Install

$ npm install @jdthornton/animated-modal

Usage

import AnimatedModal, { useModal } from "@jdthornton/animated-modal";
import '@jdthornton/animated-modal/styles.css';

function App(){

  const { isOpen, open, close } = useModal();

  return(
    <AnimatedModal isOpen={isOpen} close={close}>
      Modal
    </AnimatedModal>
  )
}

Props

PropTypeDescription
isOpenbooleanModal is open when value is set to true
openClassNamestringThe modal class applied when the modal is open
openStyleobjectThe modal style applied when the modal is open
closeFunctionThe modal close handler
showCloseButtonbooleanShows a modal close button
closeOnOverlayClickbooleanCloses the modal on overlay click
closeOnEscbooleanCloses the modal on 'ESC' key press
inertQuerySelectorstringThe query selector for the element to be made inert when the modal is open
classNamestringThe modal class
styleobjectThe modal style
overlayClassNamestringThe overlay class
overlayStyleobjectThe overlay style
labelledBystringThe aria-labelledby attribute
describedBystringThe aria-describedby attribute
1.1.9

2 years ago

1.1.8

2 years ago

1.1.7

2 years ago

1.1.6

2 years ago

1.1.5

3 years ago

1.1.4

3 years ago

1.1.3

3 years ago

1.1.2

3 years ago

1.1.1

3 years ago

1.1.0

3 years ago

1.0.9

3 years ago

1.0.8

3 years ago

1.0.7

3 years ago

1.0.6

3 years ago

1.0.5

3 years ago

1.0.4

3 years ago

1.0.3

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago