npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@axcertro/react-tailwind-confirm-box

v1.1.3

Published

A customizable confirmation modal component for React, styled with TailwindCSS.

Downloads

22

Readme

React Tailwind Confirmation Box By Axcertro (BETA)

React Tailwind Confirm Box is a sleek, easy-to-use modal component built with React, TypeScript, and TailwindCSS, designed to deliver beautiful transitions and a seamless user experience. It's fully customizable, allowing for a variety of themes including Delete Confirmation, Action Confirmation, and Custom Confirmation. Whether you're looking to enhance the user interface of your web application with dynamic, responsive modals, or need a reliable solution for confirmations, React Tailwind Confirm Box has you covered.

Features

  • Dynamic Themes: Choose from pre-defined themes or create your own for a personalized look and feel.
  • Smooth Transitions: Leverages CSS transitions for a smooth, professional user experience.
  • Fully Customizable: Tailor every aspect of your modal to fit the design of your application.
  • Built with React & TypeScript: Enjoy the robustness of TypeScript and the flexibility of React.
  • TailwindCSS Integration: Utilize TailwindCSS for easy and efficient styling.

Installation

Install React Tailwind Confirm Box with npm:

npm install @axcertro/react-tailwind-confirm-box

Or with yarn:

yarn add @axcertro/react-tailwind-confirm-box

Usage

Here's a quick example to get you started:

import React, { useState } from "react";
import { ConfirmModal, useConfirm } from "@axcertro/react-tailwind-confirm-box";

const App = () => {
  const { requestConfirm, props, handleClose } = useConfirm();

  return (
    <div className="p-4 bg-teal-800">
      <h2 className="font-[300] text-xl text-white mb-4">The Delete Button</h2>
      <button
        className="bg-red-500 hover:bg-red-700 text-white font-bold py-2 px-4 rounded"
        onClick={() =>
          requestConfirm({
            theme: ModalTheme.DeleteConfirmation,
            title: "Delete Item",
            description:
              "Are you sure you want to delete this item? This action cannot be undone.",
            onConfirm: () => {
              //  Your function here
              console.log("Item deleted.");
              handleClose();
            },
            onCancel: handleClose,
            confirmButtonText: "Delete",
            cancelButtonText: "Cancel",
          })
        }
      >
        Delete Item
      </button>
      // Use this inside your Layout file
      {props && <Modal {...props} />}
    </div>
  );
};

export default App;

Contributing

We welcome contributions to React Tailwind Confirm Box! If you have suggestions or encounter issues, please feel free to open an issue or submit a pull request.

About Us

React Tailwind Confirm Box is developed and maintained by Axcertro LLC, a leader in innovative web solutions. Our team is dedicated to creating high-quality, open-source tools and libraries to support the developer community. Learn more about our work and services at our website.

License

React Tailwind Confirm Box is available under the MIT license. See the LICENSE file for more info.