Installation
Dependencies
This component requires the following dependencies:button- shadcn/ui button componentdialog- shadcn/ui dialog componentlucide-react- Icon library
Usage
Features
- Centered layout - All content is centered for visual balance
- Success icon - Green checkmark in circular background
- Controlled state - Uses React state to manage open/close
- Responsive design - Adapts to different screen sizes with
sm:max-w-sm - Accessible - Built on Radix UI primitives with proper ARIA attributes
Component Structure
The component includes:Dialogwrapper with controlled open stateDialogTriggerbutton to show the dialogDialogContentwith centered content layout- Success icon (Check) in green circular background
DialogHeaderwith title and descriptionDialogFooterwith primary action buttonDialogCloseto handle dismissal
The dialog state is initialized as
true for demonstration purposes. In production, you’ll want to control this based on user actions.