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

@u4aew/react-component-publishing-guide

v0.1.5

Published

Modern React component library with TypeScript and SCSS modules

Downloads

5

Readme

React Component Library

Modern React component library built with TypeScript, SCSS modules, and Storybook for documentation and development.

🚀 Features

  • React 19 with full TypeScript support
  • SCSS Modules for scoped styling with automatic CSS injection
  • Storybook for component development and documentation
  • Vite for fast builds and development
  • ESLint for code quality
  • Automated CI/CD with GitHub Actions
  • NPM Publishing workflow
  • GitHub Pages deployment for Storybook
  • Bundle Size Analysis with automatic reports
  • Usage Analytics with integrations for Google Analytics, Amplitude, Mixpanel

📦 Installation

npm install @u4aew/react-component-publishing-guide

🎯 Usage

import { Button } from '@u4aew/react-component-publishing-guide';

function App() {
  return (
    <Button 
      primary 
      size="medium" 
      label="Click me!" 
      onClick={() => console.log('Button clicked!')} 
    />
  );
}

🛠 Development

Prerequisites

  • Node.js 20+
  • npm

Setup

# Clone the repository
git clone https://github.com/u4aew/react-component-publishing-guide.git
cd react-component-lib

# Install dependencies
npm install

# Start Storybook development server
npm run storybook

Available Scripts

| Command | Description | |---------|-------------| | npm run storybook | Start Storybook development server | | npm run build-storybook | Build Storybook for production | | npm run build | Build library for production | | npm run lint | Run ESLint | | npm run preview | Preview production build | | npm run analyze | Analyze bundle size and open report | | npm run size-report | Generate detailed size report |

📚 Components

Button

Primary UI component for user interaction.

Props:

  • primary?: boolean - Is this the principal call to action on the page?
  • backgroundColor?: string - What background color to use
  • size?: 'small' | 'medium' | 'large' - How large should the button be?
  • label: string - Button contents
  • onClick?: () => void - Optional click handler

Example:

<Button primary size="large" label="Primary Button" />

🏗 Architecture

src/
├── components/
│   └── ComponentName/
│       ├── ComponentName.tsx     # Component implementation
│       ├── ComponentName.module.scss # Component styles
│       └── __stories__/          # Storybook stories
│           └── ComponentName.stories.ts
└── index.ts                      # Main export file

📊 Analytics & Monitoring

Bundle Size Analysis

Automatic bundle size tracking with visual reports:

npm run analyze  # Opens detailed bundle analysis
npm run size-report  # Console and JSON report

Usage Analytics

Integrates with popular analytics services automatically:

import { useAnalytics } from '@u4aew/react-component-publishing-guide';

const { trackMount, trackClick } = useAnalytics('Button');
// Works with Google Analytics, Amplitude, Mixpanel

Supported Services:

  • Google Analytics - gtag('event', 'component_mount', ...)
  • Amplitude - amplitude.logEvent('Component mount', ...)
  • Mixpanel - mixpanel.track('Component mount', ...)
  • Custom endpoint - via configuration

🔄 CI/CD

The project includes automated workflows:

  • CI: Runs on every push/PR (linting, building, bundle analysis)
  • NPM Publishing: Triggered by releases or manual dispatch
  • Storybook Deploy: Automatically deploys to GitHub Pages
  • Bundle Reports: Automatic PR comments with size changes

📖 Documentation

View the live Storybook documentation: https://u4aew.github.io/react-component-publishing-guide

🤝 Contributing

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add some amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

📄 License

This project is licensed under the MIT License - see the LICENSE file for details.

👤 Author

u4aew

🙏 Acknowledgments