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

@rohit-shinde/test-mylib

v0.0.1

Published

A React component library with customizable Button component

Readme

@rohit-shinde/test-mylib

A React component library with a customizable Button component built with TypeScript and SCSS modules.

Installation

npm install @rohit-shinde/test-mylib

or

yarn add @rohit-shinde/test-mylib

Components

Button

A flexible and customizable button component with multiple variants and sizes.

Props

| Prop | Type | Default | Description | |------|------|---------|-------------| | types | "primary" | "tertiary" | "subtle" | "ghost" | "primary" | Button variant style | | size | "regular" | "small" | "regular" | Button size | | leftIcon | React.ReactNode | undefined | Icon to display on the left side | | rightIcon | React.ReactNode | undefined | Icon to display on the right side | | label | React.ReactNode | undefined | Button label text | | ...rest | ButtonHTMLAttributes | - | All standard HTML button attributes |

Usage

import { Button } from '@rohit-shinde/test-mylib';

function App() {
  return (
    <div>
      {/* Primary button */}
      <Button label="Click me" onClick={() => console.log('Clicked!')} />
      
      {/* Small button with icon */}
      <Button 
        label="Save" 
        size="small" 
        types="primary"
        leftIcon={<SaveIcon />}
      />
      
      {/* Ghost button */}
      <Button 
        label="Cancel" 
        types="ghost"
        onClick={() => console.log('Cancelled')}
      />
      
      {/* Disabled button */}
      <Button 
        label="Submit" 
        disabled
      />
    </div>
  );
}

Variants

  • primary: Solid background with primary color
  • tertiary: Dark background variant
  • subtle: Light background with primary text
  • ghost: Transparent with border

Sizes

  • regular: Default size (48px height)
  • small: Compact size (40px height)

Development

Setup

# Install dependencies
npm install

# Start development mode (watch)
npm start

# Build the library
npm run build

# Run tests
npm test

# Lint code
npm run lint

Project Structure

src/
├── components/
│   └── Button/
│       ├── Button.tsx
│       ├── Button.module.scss
│       └── index.ts
├── styles/
│   ├── colorToken.scss
│   ├── fontToken.scss
│   └── spacingToken.scss
├── index.tsx
└── types.d.ts

Publishing to NPM

First Time Setup

  1. Create an NPM account (if you don't have one):

  2. Login to NPM from terminal:

    npm login
  3. Update package name (if needed):

    • Edit package.json and change name to a unique package name
    • Check availability: npm view <package-name>

Publishing Steps

  1. Build the library:

    npm run build
  2. Update version (follow Semantic Versioning):

    # For patch release (0.1.0 -> 0.1.1)
    npm version patch
       
    # For minor release (0.1.0 -> 0.2.0)
    npm version minor
       
    # For major release (0.1.0 -> 1.0.0)
    npm version major
  3. Publish to NPM (scoped packages require --access public):

    npm publish --access public

Using in Another Project

After publishing, install in your other project:

npm install @rohit-shinde/test-mylib

Then import and use:

import { Button } from '@rohit-shinde/test-mylib';

function MyApp() {
  return <Button label="Hello World" />;
}

TypeScript Support

This library is built with TypeScript and includes type definitions. TypeScript will provide autocomplete and type checking when using this library.

License

MIT © rohits04

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.