Components
A basic and commonly used modal.
| Version: | 14.18.2 •View source•Changelog•Report issue | |
|---|---|---|
| Install: | yarn add @thumbtack/thumbprint-react | |
| Import: | import { ModalStandard } from '@thumbtack/thumbprint-react'; | |
Deprecated
This package was deprecated in favor of Modal.
Modals can be opened or closed with a isOpen prop.
This example includes a wrapper component that opens the modal when the button is clicked on.
onCloseClickFunction that fires to close the modal.
funcchildrenContent that appears above the Backdrop.
nodeundefinedonOpenFinishFunction that fires once the modal has opened and transitions have ended.
funcundefinedonCloseFinishFunction that fires once the modal has closed and transitions have ended.
funcundefinedshouldCloseOnBackdropClickDetermines if the modal should close when clicking on the Backdrop,
outside of the children.
booltrueshouldHideCloseButtonDetermines if the close button should be rendered. This is generally discouraged and should be used carefully. If used, the contents passed into the modal must contain a focusable element such as a link or button.
boolfalseisOpenShould the Backdrop appear open.
boolfalsethemeSets the color of the background and close button.
oneOf([
'brand',
'faint',
])'faint'