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 🙏

© 2026 – Pkg Stats / Ryan Hefner

react-modal-bizwi

v0.2.0

Published

A reusable modal component in React

Readme

react-modal-bizwi

A simple and reusable React modal component for displaying customizable modal windows.

Installation

Install my-project with npm

  npm install react-modal-bizwi

Or

  yarn add react-modal-bizwi

Usage/Examples

import React, { useState } from 'react';
import Modal from 'react-modal-bizwi';

const ExampleComponent = () => {
  const [isModalOpen, setIsModalOpen] = useState(false);

  return (
    <div>
      <button onClick={() => setIsModalOpen(true)}>Open Modal</button>
      <Modal isOpen={isModalOpen} onClose={() => setIsModalOpen(false)}>
        <p>Employee Created!</p>
      </Modal>
    </div>
  );
};

export default ExampleComponent;

Props

The react-modal-bizwi component accepts the following props:

  • isOpen (boolean,required): Controls whether the modal is visible.
  • onClose (function,required): Controls whether the modal is visible.
  • children (ReactNode,required): Controls whether the modal is visible.
  • style (object, optional): Inline styles to customize the modal container.
  • className (string, optional): Custom class name to apply to the modal container for additional styling.

Customization

Using className

You can customize the modal's appearance by passing a custom className prop:

<Modal isOpen={isOpen} onClose={() => setIsOpen(false)} className="custom-modal">
  <p>Customizable Content</p>
</Modal>

Add your styles in a CSS/SCSS file:

.custom-modal {
  background-color: blue;
  padding: 20px;
  border-radius: 8px;
}

Using style Prop

Alternatively, you can customize styles using the style prop:

<Modal isOpen={isOpen} onClose={() => setIsOpen(false)} style={{ backgroundColor: 'blue', padding: '20px' }}>
  <p>Customizable Content</p>
</Modal>

CSS Classes Used

  • .modal-overlay: Styles the overlay/background of the modal.
  • .modal: Styles the modal container itself.
  • .modal-content: Styles the content area within the modal.
  • .close-modal: Styles the close button inside the modal.

Example Custom Styling

.modal-overlay {
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
}

.modal {
  background: white;
  padding: 20px;
  border-radius: 8px;
  max-width: 500px;
  width: 100%;
}

.close-modal {
  background: none;
  border: none;
  font-size: 1.2rem;
  position: absolute;
  top: 10px;
  right: 10px;
  cursor: pointer;
}

Authors