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

@chasecoding/nice-buttons

v1.0.5

Published

NPM package containing nice, customizable buttons!

Downloads

21

Readme

Buttons

BasicButton

This button is what it sounds like, a customizable button at its most basic level. You can pass it unique styling, the text shown, and an onclick function via props. The syntax is as follows:

<BasicButton style={StylePropHere} onclick={ClickFunctionhere} buttonText={ButtonTextPropHere} />

Button

This button is a more styled button, and can be choosen through its type (which uses classes to handle changing the styling). The syntax for this one is as follows:

<Button style={StylePropHere} onclick={ClickFunctionhere} buttonText={ButtonTextPropHere} />

There are multiple types of buttons using this method, you can also add more styling via the style prop as shown above

Button Types -Modern M-Red -Modern M-Blue -Modern M-Green -Modern M-Yellow -Modern M-Orange -Modern M-Pink -Modern M-Brown -Modern M-Purple -Modern M-White -Modern M-Black -Modern M-Gray -Modern M-Cyan

These button types are referencing classes, so you can remove the color, and just use 'Modern' within the type prop and add your own background color and text color to the buttons. Using this fashion will give the developer/designer the most use from these buttons. Make sure to pass these props as strings.

Inverted Button Types -Modern M-White-Inverted -Modern M-Black-Inverted

These button types also are referencing classes, however these when hovered over give an inverted color.

ConnectedButtons

This is going to act as a parent container for the buttons and will allow the buttons to connect together as a horizontal bar. Syntax is as follows:

<ConnectedButtons> <Button style={StylePropHere} onclick={ClickFunctionhere} buttonText={ButtonTextPropHere} /> <Button style={StylePropHere} onclick={ClickFunctionhere} buttonText={ButtonTextPropHere} /> <Button style={StylePropHere} onclick={ClickFunctionhere} buttonText={ButtonTextPropHere} /> </ConnectedButtons>

The buttons will be auto formatted into a nice bar of buttons using this method

OldschoolButton

These buttons are meant to be used in an OldschoolButtonBar so they are interconnected, and act as a toolbar. There is a prop for the icon that will display within the button. You also must set the height and width of the buttons. There is a default color, however that can be overwritten by including the color prop and stating a color, either base (red, blue, etc), or via hex and rgb. There is also a tooltip on these, if you choose to include a True property within a tooltip prop. The tooltip will take the information from the image's alt prop, so if you want to utilize this be sure to use the proper alt information. You can add a tooltip by utilizing the tooltip prop, as well. The syntax is as follows:

<OldschoolButton buttonImage={ButtonImagePropHere} alt='User Account' height={ButtonHeightHere} width={ButtonWidthHere} color={ColorValueHere} />

OldschoolButtonBar

The OldschoolButtonBar is a container for OldschoolButton components. It will format the buttons into a nice toolbar to use within the application. The syntax is as follows:

<OldschoolButtonBar> <OldschoolButton buttonImage={ButtonImagePropHere} alt='User Account' height={ButtonHeightHere} width={ButtonWidthHere} color={ColorValueHere} /> <OldschoolButton buttonImage={ButtonImagePropHere} alt='User Account' height={ButtonHeightHere} width={ButtonWidthHere} color={ColorValueHere} /> <OldschoolButton buttonImage={ButtonImagePropHere} alt='User Account' height={ButtonHeightHere} width={ButtonWidthHere} color={ColorValueHere} /> </OldschoolButtonBar>