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.
onCloseClick
Function that fires to close the modal.
func
children
Content that appears above the Backdrop.
node
undefined
onOpenFinish
Function that fires once the modal has opened and transitions have ended.
func
undefined
onCloseFinish
Function that fires once the modal has closed and transitions have ended.
func
undefined
shouldCloseOnBackdropClick
Determines if the modal should close when clicking on the Backdrop,
outside of the children
.
bool
true
shouldHideCloseButton
Determines 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.
bool
false
isOpen
Should the Backdrop appear open.
bool
false
theme
Sets the color of the background and close button.
oneOf([
'brand',
'faint',
])
'faint'