How to use react-aria-modal - 1 common examples

To help you get started, we’ve selected a few react-aria-modal examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github DefinitelyTyped / DefinitelyTyped / types / react-aria-modal / react-aria-modal-tests.tsx View on Github external
import AriaModal from 'react-aria-modal';
import * as React from 'react';
import { render } from 'react-dom';

declare const appContainer: HTMLElement;

const onExit = () => {};

render(
    <AriaModal onExit={onExit} titleId="describedby" underlayClickExits>
        <p id="describedby">Hello world</p>
    </AriaModal>,
    appContainer
);

const DisplacedModal = AriaModal.renderTo('#some-id');

render(
    <DisplacedModal onExit={onExit} titleId="describedby" underlayClickExits>
        <p id="describedby">Hello world</p>
    </DisplacedModal>,
    appContainer
);

react-aria-modal

A fully accessible and flexible React modal built according WAI-ARIA Authoring Practices

MIT
Latest version published 2 months ago

Package Health Score

82 / 100
Full package analysis

Popular react-aria-modal functions