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

@sem.antony/component-generator

v0.0.4

Published

CLI for creating Atomic Design components

Readme

Plop Generator for Atomic Design Components 🧱

This script is a Plop generator designed to streamline the creation of components following the Atomic Design methodology. It automates the creation of component files, including TypeScript, SCSS, and Storybook files, and ensures proper export management in the project structure.

Purpose

The generator simplifies the process of creating and organizing components in a UI Kit by:

  • Generating component files for different atomic layers (atoms, molecules, organisms, templates, pages).
  • Automatically updating index.ts files for proper exports at both the layer and root levels.
  • Enforcing a consistent structure and naming convention.

How It Works

  1. Prompts: The generator asks the user for input, such as:
  • The atomic layer (e.g., atoms, molecules, organisms, etc.).
  • The component name (e.g., Button, Input, Card, etc.).
  • Optional props for components in specific layers (atoms, molecules, organisms).
  1. File Generation: Based on the input, the generator creates:
  • A .tsx file for the component.
  • Optional .module.scss and .stories.tsx files for styling and Storybook integration (for atoms, molecules, and organisms).
  • An index.ts file for local exports.
  1. Export Management:
  • Updates the index.ts file in the component's layer to include the new component.
  • Updates or creates the root ui-kit/index.ts file to ensure all layers are exported, maintaining alphabetical order.
  1. Helpers:
  • renderPropsInterface: Generates a TypeScript interface for the component's props.
  • renderPropsDestructure: Generates a destructured list of props for use in the component.

How to Use

  1. Install Plop: Ensure you have Plop installed in your project:
npm install --save-dev plop
  1. Add the Generator: Save this script in your project (e.g., plopfile.js).

  2. Run the Generator: Execute the following command to start the generator:

npx plop

Or you can adding a Shortcut Command To simplify running the generator, you can add the following command to the scripts section of your package.json file:

"scripts": {
"generate": "plop"
}

and then run npm run generate, or (your package manager) generate.

  1. Follow the Prompts:
  • Choose the atomic layer.
  • Enter the component name.
  • Optionally, specify props for atoms, molecules, or organisms.
  1. Generated Files: The generator will create the necessary files in the ui-kit directory, organized by atomic layers.

  2. Export Updates: The generator will automatically update the index.ts files to include the new component.

Who Should Use This?

This generator is ideal for frontend developers working on projects that follow the Atomic Design methodology. It is especially useful for teams that:

  • Want to maintain a consistent component structure.
  • Need to automate repetitive tasks like file creation and export management.
  • Use tools like Storybook for component documentation.

Example

If you create a Button component in the atoms layer with props label:string, disabled:boolean, the generator will:

  • Create the following files:

    
    ui-kit/atoms/Button/Button.tsx
    ui-kit/atoms/Button/Button.module.scss
    ui-kit/atoms/Button/Button.stories.tsx
    ui-kit/atoms/Button/index.ts
    
  • Update ui-kit/atoms/index.ts with:

    export * from './Button';
  • Update or create ui-kit/index.ts with:

    export * from './atoms';
    export * from './molecules';
    export * from './organisms';

This ensures the new component is properly integrated into the project.