Search Themes

Search for themes and categories

aslam97's avatar

React Confirm Dialog

by aslam97

React Confirm Dialog

154
Feb 6, 2025
open-source
React Confirm Dialog screenshot

Overview

The React Confirm Dialog is a flexible and customizable confirm dialog component designed for React applications, prioritizing accessibility. It offers an easy-to-use useConfirm hook, full customization of appearance and behavior, support for custom actions, and seamless integration with the Shadcn UI.

Features

  • Easy to use with the useConfirm hook
  • Fully customizable appearance and behavior
  • Supports custom actions
  • Seamless integration with Shadcn UI

Installation

To install the React Confirm Dialog package from npm:

npm install react-confirm-dialog

Usage:

  1. Wrap your app with the ConfirmDialogProvider.
  2. Use the useConfirm hook in your components.
  3. Update your Tailwind configuration by adding the library classes to your tailwind.config.js.

Configuration for Non-Shadcn UI Users:

  1. Update your tailwind.config.js.
  2. Add CSS variables to your main CSS file or get colors from Shadcn UI.

Summary

The React Confirm Dialog is a valuable tool for React developers seeking an accessible and customizable confirm dialog component. With features such as easy integration, full customization, and support for custom actions, it enhances the user experience within React applications. Additionally, its seamless integration with Shadcn UI provides a cohesive design experience.