Modal Base(React)

The basic modal functionality without any styles

Version:14.18.2 View sourceChangelogReport issue
Install:yarn add @thumbtack/thumbprint-react
Import:import { ModalBase } from '@thumbtack/thumbprint-react';


This package was deprecated in favor of ModalCurtain.

Basic ModalBase

Modal with wrapper component

This example includes a wrapper component that opens the modal when the button is clicked on.



We need to make sure we don’t mount the DisplacedModalStructure (which uses portals) before componentDidMount because it’ll cause warnings (and actual bugs) with server-side rendering. Pattern taken from react docs and solutions to issues: