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

@bartwijnants/component-library

v1.1.0

Published

In this story, I will take you along on my journey to create a React Component Library. Don't expect to write a bunch of components. I left that part out because it's too subjective. Instead, we will be using Storybook, Typescript, Jest, GitHub Pages, and

Readme

Create, Automate and Document Your Own React Component Library From Scratch

In this story, I will take you along on my journey to create a React Component Library. Don't expect to write a bunch of components. I left that part out because it's too subjective. Instead, we will be using Storybook, Typescript, Jest, GitHub Pages, and a lot more to create a practically empty but almost production-ready Component Library.

Why?

Because of reasons. No seriously, when your app, company, or never finished personal projects start to grow, you need to guard your style.

A Component Library can help you use consistent UI elements across your organization. A Component Library can provide the building blocks you need to develop new features.

But it can only work if you have a high-quality Component Library. Your Component Library needs to evolve without friction. Using and updating your Component Library has to be effortless.

So let's go and create a Component Library that will make you proud!

Getting started

mkdir component-libary
cd component-library
git init
echo "node_modules" >> .gitignore
npm init -y
npm install -D typescript
touch tsconfig.json
{
  "compilerOptions": {
    "target": "es5",
    "lib": ["dom", "dom.iterable", "esnext"],
    "allowJs": true,
    "skipLibCheck": true,
    "esModuleInterop": true,
    "allowSyntheticDefaultImports": true,
    "strict": true,
    "forceConsistentCasingInFileNames": true,
    "noFallthroughCasesInSwitch": true,
    "module": "esnext",
    "moduleResolution": "node",
    "resolveJsonModule": true,
    "isolatedModules": true,
    "noEmit": true,
    "jsx": "react-jsx"
  },
  "include": ["components"]
}
npm install react react-dom
npm install -D @types/react @types/react-dom
mkdir components components/title
touch components/title/Title.tsx

components/title/Title.tsx

type Props = { children: React.ReactNode };

export const Title = ({ children }: Props) => <h1>{children}</h1>;

Documentation

npx sb init

package.json

"scripts": {
    "storybook": "start-storybook -p 6006",
    "build-storybook": "build-storybook"
}
npm run storybook

.storybook/main.js

module.exports = {
  stories: [
    "../components/**/*.stories.mdx",
    "../components/**/*.stories.@(ts|tsx)",
  ],
  addons: ["@storybook/addon-links", "@storybook/addon-essentials"],
};
rm -rf stories
touch components/title/Title.stories.tsx

components/title/Title.stories.tsx

import { Meta } from "@storybook/react/types-6-0";
import { Title } from "./Title";

export default {
  title: "Components/Title",
  component: Title,
} as Meta;

export const Primary = () => <Title>A Title</Title>;
npm run storybook
mkdir .github .github/workflows
touch .github/workflows/publish-to-github-pages.yml
name: publish-to-github-pages

on:
  workflow_dispatch:

  push:
    branches: [main]

jobs:
  build-and-deploy:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - uses: actions/setup-node@v1
        with:
          node-version: 14
      - run: npm ci
      - run: npm run build-storybook
      - uses: crazy-max/[email protected]
        with:
          build_dir: "storybook-static"
          jekyll: false
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

https://github.com/new

git add .
git commit -m "initial commit"
git remote add origin [email protected]:bartw/ubiquitous-succotash.git
git branch -M main
git push -u origin main

https://github.com/bartw/ubiquitous-succotash/settings

GitHub Pages

Run Workflow

Bundling

Code quality

CI/CD

What's next?