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

modalagnes73

v0.1.4

Published

A styled modal component using the styled-components library. The component contains various styles for the different components.

Readme

Modal Component in React

A styled modal component using the styled-components library. The component contains various styles for the different components.

The animation for the ModalBody is created using keyframes and styles for each component can be customized by passing dynamic values through the "attrs" method.

How to install the Modal

You can find the npm package here.
You can find the github repository here.

npm install modalagnes73
import React, { Component } from 'react'
import Modal from 'modalagnes73'

const Exemple = () => {

    const [isOpen, setIsOpen] = useState(false);

return(
    <>

    {isOpen && <Modal setIsOpen={setIsOpen} close/>}
    <button onClick={() => setIsOpen(true)}>Open</button>

    </>
)
}

Properties

What props can you add ?

setIsOpen: function to close the modal.
modalTitle: title displayed in the ModalContent (default: "Employee created").
modalText: text displayed in the ModalContent (default: "If you want, you can create more!").
close: whether to display the close icon in the alert component (default close color: "green-300").
closecolor: color of the close icon in the alert component.
sizeclose: size of the close icon (default: "header4").
check: display of the check icon in the Modal component.
checkcolor: color of the check mark.
sizecheck: size of the check mark (default: "iconLarge").
animationBody: enables the animation on the ModalBody.
button: display of a button in the Modal component (default button text: "Close", default button background color: "green-300", default button text color: "neutral-1000").
buttonbg: background color of the ModalButton.
buttonText: text of the button.
buttonTextColor: text color of the ModalButton.
buttonbgHover: background color of the ModalButton when hovered (default: "green-200").
bodyColor: background color of the modal (default: "neutral-100").
overlayColor: background color of the overlay (default: "neutral-500").

How to change the colours ?

You have access to a large colour palette that you can write as in Tailwind Css.

The range goes from 50, 100, 200, ... up to 900 except for neutral

Les colours are:

  • neutral: neutral-000 is white, neutral 1000 is black
  • green
  • red
  • blue
  • yellow ... and others soon !!!

For example, if you want to change the colour of the close icon, you would add the props close to display the button and closecolor to change the color like this:

<Modal close closecolor="red-500" />

You can change the icons size

You have access to a different sizes that you can write.

Here are the size:

  • iconLarge: 3rem,
  • iconBase: 2rem,
  • header1: 1.8rem,
  • header2: 1.6rem,
  • header3: 1.4rem,
  • header4: 1.2rem,
  • header5: 1.1rem,
  • paragraph: 1rem,
  • helperText: 0.8rem,
  • copyrightText: 0.7rem,

For example, if you want to change the size of the close icon, you would add the props close to display the icon and sizeclose to change the size.

<Modal close sizeclose="header3" />

Pay attention to upper and lower case when writing the props !!!