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_customizable_modal_boilerplate_clippens

v0.3.6

Published

react customizable modal by clippens

Readme

A modal ReactJS boilerplate component and customizable for theme and colors!

Context

Modal component for React, keep theme default colors or choose ones as you like

Intall Steps

You can install this component with npm or yarn:

npm i react_customizable_modal_boilerplate_clippens

In your React project

Import modal component into the file

import { Modal } from "react_customizable_modal_boilerplate_clippens"

NpmJS package link:

https://www.npmjs.com/package/react_customizable_modal_boilerplate_clippens

Example for using in a react project:

ReactApp.js

import "./ModaleStyling.css";
import { Modal } from "react_customizable_modal_boilerplate_clippens";
import { useState } from "react";

function App() {
	// Open and close modale
	const [openModale, setOpenModale] = useState(false);
	const onOpenModale = () => setOpenModale(true);
	const onCloseModale = () => setOpenModale(false);
	const Submit = (event) => {
		event.preventDefault();
		onOpenModale();
	};
	return (
		<div className="ReactApp">
			<form onSubmit={Submit}>
				<button type="submit" className="submit">
					Click here to open Modale
				</button>
			</form>

			{openModale && <Modal close={onCloseModale} text="Write your text here" />}
		</div>
	);
}

export default App;

Props list

| Name | Type | Required | Description | Default | | ----- | ------- | -------- | --------------------------------------------- | ------- | | text | string | Yes | The text to be displayed in the modal | | | close | boolean | Yes | The close button to be displayed in the modal | |

ModaleStyling.css Customize colors, dimensions and all for background modal, close button background modal and modal

/* global modal parameters */

.modal {
	width: 80%;
	max-width: 500px;
	padding: 15px 30px;
	border-radius: 0.5rem;
	background: #d5db99; /*  modal background color */
	box-shadow: 0 0 10px #000;
	text-align: left;
	vertical-align: middle;
	box-sizing: border-box;
	display: inline-block;
	z-index: 2;
	position: relative;
}

/* modal close modal icon parameters */
.modal .close-modal {
	background-image: url(test); /*  close modal icon in base64 to load faster */
	display: block;
	position: absolute;
	top: -16.5px;
	right: -16.5px;
	width: 50px;
	height: 50px;
	border: none;
	background-color: transparent; /*  close button background color */
	background-position: center center;
	background-repeat: no-repeat;
	background-size: contain;
	text-indent: -9999px;
	cursor: pointer;
}

/* bacground behind modal parameters */

.modal-background {
	background-color: rgba(5, 6, 7, 8.76); /*  modal background color outside */
	right: 0;
	bottom: 0;
	left: 0;
	width: 150vw;
	height: 150vh;
	padding: 30px;
	overflow: auto;
	text-align: center;
	font-weight: bold;
	box-sizing: border-box;
	z-index: 1;
	position: fixed;
	top: 0;
}

/*  before background behind modal parameters */

.modal-background::before {
	display: inline-block;
	margin-right: 0.05em;
	vertical-align: middle;
	content: "";
	height: 100%;
}