# `` Creates a modal overlay. This component is similar to [``](./Overlay.md) but provides the following extras: - traps tabbing focus inside the overlay. - makes all other root level elements inert to user input. - sets aria title and description ids. ### Usage Basic example. ```jsx import {Modal} from 'libreact/lib/Modal'; This is modal. ``` Set aria title, description, and close button. ```jsx {({idTitle, idDescription, close}) =>

My title

This is description.

}
``` Track when user intends to close the the modal. ```jsx This is modal. ``` ## Props Accepts all [``](./Overlay.md) props in addition to: - `dontLockFocus` — optional, boolean, does not jail tabbing focus if true, defaults to `false`. - `onEsc` — optional, callback, called when user presses `Esc` button. - `onClose` — optional, callback, called when `close()` is executed. ## State `` is a render prop that injects its state into the render function. State has the following keys. - `close()` — method to calle `onClose` event. - `idTitle` — id to set for aria title element. - `idDescription` — id to set for aria description element. Root nodes with `data-modal-ignore` attribute will not be dirty mutated (to create blur effect).