Dialog
A window overlaid on either the primary window or another dialog window, rendering the content underneath inert.
Usage
Dialog
component takes in propstrigger
,title
anddescription
.trigger
prop is the component that triggers the dialog to open. It is required. I can be anyReact Component
or even a simplestring
.title
anddescription
are just the text that is displayed in the dialog. They are optional.
Interface for DialogProps
interface DialogProps {
trigger: React.ReactNode;
title?: string;
description?: string;
children?: React.ReactNode;
}
Customizable Design
More granular components provide you with more control over the design of the Dialog
component. You can customize the design of the Dialog
component by using the following sub-components:
- Style of every sub-component of the Dialog component can be customized using the
className
prop. - Pass in a
CSS class
or useTailwind CSS
utility classes to style the Dialog component.