@types/react-modal
- Version 3.16.3
- Published
- 10.4 kB
- 1 dependency
- MIT license
Install
npm i @types/react-modalyarn add @types/react-modalpnpm add @types/react-modalOverview
TypeScript definitions for react-modal
Index
Classes
Interfaces
Props
- appElement
- aria
- ariaHideApp
- bodyOpenClassName
- children
- className
- closeTimeoutMS
- contentElement
- contentLabel
- contentRef
- data
- htmlOpenClassName
- id
- isOpen
- onAfterClose()
- onAfterOpen
- onRequestClose()
- overlayClassName
- overlayElement
- overlayRef
- parentSelector()
- portalClassName
- preventScroll
- role
- shouldCloseOnEsc
- shouldCloseOnOverlayClick
- shouldFocusAfterRender
- shouldReturnFocusAfterClose
- style
- testId
Classes
class ReactModal
class ReactModal extends React.Component<ReactModal.Props> {}property defaultStyles
static defaultStyles: ReactModal.Styles;property portal
portal: { overlay: null | HTMLDivElement; content: null | HTMLDivElement };method setAppElement
static setAppElement: (appElement: string | HTMLElement) => void;Call this to properly hide your application from assistive screenreaders and other assistive technologies while the modal is open.
Interfaces
interface Aria
interface Aria {}property describedby
describedby?: string | undefined;Identifies the element (or elements) that describes the object.
property labelledby
labelledby?: string | undefined;Defines a string value that labels the current element.
property modal
modal?: boolean | 'false' | 'true' | undefined;Indicates whether an element is modal when displayed.
interface Classes
interface Classes {}property afterOpen
afterOpen: string;property base
base: string;property beforeClose
beforeClose: string;interface OnAfterOpenCallback
interface OnAfterOpenCallback {}Describes unction that will be run after the modal has opened
call signature
(obj?: OnAfterOpenCallbackOptions): void;interface OnAfterOpenCallbackOptions
interface OnAfterOpenCallbackOptions {}Describes overlay and content element references passed to onAfterOpen function
interface Props
interface Props {}property appElement
appElement?: HTMLElement | HTMLElement[] | HTMLCollection | NodeList | undefined;property aria
aria?: Aria | undefined;property ariaHideApp
ariaHideApp?: boolean | undefined;property bodyOpenClassName
bodyOpenClassName?: string | null | undefined;property children
children?: React.ReactNode;property className
className?: string | Classes | undefined;property closeTimeoutMS
closeTimeoutMS?: number | undefined;property contentElement
contentElement?: | (( props: React.ComponentPropsWithRef<'div'>, children: React.ReactNode ) => React.ReactElement) | undefined;property contentLabel
contentLabel?: string | undefined;property contentRef
contentRef?: ((instance: HTMLDivElement) => void) | undefined;property data
data?: any;property htmlOpenClassName
htmlOpenClassName?: string | null | undefined;property id
id?: string | undefined;property isOpen
isOpen: boolean;property onAfterOpen
onAfterOpen?: OnAfterOpenCallback | undefined;property overlayClassName
overlayClassName?: string | Classes | undefined;property overlayElement
overlayElement?: | (( props: React.ComponentPropsWithRef<'div'>, contentEl: React.ReactElement ) => React.ReactElement) | undefined;property overlayRef
overlayRef?: ((instance: HTMLDivElement) => void) | undefined;property portalClassName
portalClassName?: string | undefined;property preventScroll
preventScroll?: boolean | undefined;property role
role?: string | null | undefined;property shouldCloseOnEsc
shouldCloseOnEsc?: boolean | undefined;property shouldCloseOnOverlayClick
shouldCloseOnOverlayClick?: boolean | undefined;property shouldFocusAfterRender
shouldFocusAfterRender?: boolean | undefined;property shouldReturnFocusAfterClose
shouldReturnFocusAfterClose?: boolean | undefined;property style
style?: Styles | undefined;property testId
testId?: string | undefined;method onAfterClose
onAfterClose: () => void;method onRequestClose
onRequestClose: (event: React.MouseEvent | React.KeyboardEvent) => void;method parentSelector
parentSelector: () => HTMLElement;Package Files (1)
Dependencies (1)
Dev Dependencies (0)
No dev dependencies.
Peer Dependencies (0)
No peer dependencies.
Badge
To add a badge like this oneto your package's README, use the codes available below.
You may also use Shields.io to create a custom badge linking to https://www.jsdocs.io/package/@types/react-modal.
- Markdown[](https://www.jsdocs.io/package/@types/react-modal)
- HTML<a href="https://www.jsdocs.io/package/@types/react-modal"><img src="https://img.shields.io/badge/jsDocs.io-reference-blue" alt="jsDocs.io"></a>
- Updated .
Package analyzed in 2262 ms. - Missing or incorrect documentation? Open an issue for this package.
