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

cherry-system

v0.2.1

Published

Cherry System - A Easy way to implement UI Components to your React projects.

Readme

🎨 Cherry System

Una librería de componentes React estilo shadcn/ui con Tailwind CSS y TypeScript.

📋 Requisitos Previos

  • Node.js versión 18 o superior
  • npm o pnpm o yarn

🚀 Instalación

1. Clonar/Copiar el proyecto

Copia la carpeta mi-libreria-ui a tu ubicación deseada.

2. Instalar dependencias

Abre tu terminal, navega a la carpeta del proyecto y ejecuta:

cd mi-libreria-ui
npm install

¿Qué hace esto? Lee el archivo package.json y descarga todas las librerías necesarias a una carpeta llamada node_modules.

3. Iniciar Storybook

npm run storybook

¿Qué hace esto? Inicia un servidor local en http://localhost:6006 donde puedes ver y probar todos tus componentes.

📁 Estructura del Proyecto

mi-libreria-ui/
├── .storybook/              # Configuración de Storybook
│   ├── main.ts              # Configuración principal
│   └── preview.ts           # Estilos y decoradores globales
│
├── src/
│   ├── components/          # 🧩 TUS COMPONENTES
│   │   ├── Button/
│   │   │   ├── Button.tsx           # El componente
│   │   │   ├── Button.stories.tsx   # Documentación Storybook
│   │   │   └── index.ts             # Exportación
│   │   └── index.ts         # Exporta todos los componentes
│   │
│   ├── lib/
│   │   └── utils.ts         # Función cn() para clases
│   │
│   └── styles/
│       └── globals.css      # Estilos globales + Tailwind
│
├── tailwind.config.js       # 🎨 PERSONALIZA TUS COLORES AQUÍ
├── package.json             # Dependencias del proyecto
└── tsconfig.json            # Configuración de TypeScript

🎨 Personalización

Cambiar Colores

Edita el archivo tailwind.config.js:

colors: {
  primary: {
    500: '#tu-color-aquí',  // Color principal
    // ... otros tonos
  },
}

Cambiar Fuentes

  1. Agrega tu fuente en src/styles/globals.css:
@import url('https://fonts.googleapis.com/css2?family=Tu+Fuente&display=swap');
  1. Actualiza tailwind.config.js:
fontFamily: {
  sans: ['Tu Fuente', 'sans-serif'],
}

🧩 Crear un Nuevo Componente

Paso 1: Crear la carpeta

src/components/MiComponente/
├── MiComponente.tsx
├── MiComponente.stories.tsx
└── index.ts

Paso 2: Crear el componente

// src/components/MiComponente/MiComponente.tsx
import * as React from "react"
import { cn } from "@/lib/utils"

export interface MiComponenteProps {
  children: React.ReactNode
  className?: string
}

const MiComponente = React.forwardRef<HTMLDivElement, MiComponenteProps>(
  ({ className, children, ...props }, ref) => {
    return (
      <div
        ref={ref}
        className={cn("tu-clase-base", className)}
        {...props}
      >
        {children}
      </div>
    )
  }
)

MiComponente.displayName = "MiComponente"

export { MiComponente }

Paso 3: Crear las stories

// src/components/MiComponente/MiComponente.stories.tsx
import type { Meta, StoryObj } from "@storybook/react"
import { MiComponente } from "./MiComponente"

const meta: Meta<typeof MiComponente> = {
  title: "Componentes/MiComponente",
  component: MiComponente,
  tags: ["autodocs"],
}

export default meta
type Story = StoryObj<typeof meta>

export const Default: Story = {
  args: {
    children: "Contenido de ejemplo",
  },
}

Paso 4: Exportar el componente

// src/components/MiComponente/index.ts
export { MiComponente } from "./MiComponente"
export type { MiComponenteProps } from "./MiComponente"
// src/components/index.ts
export { MiComponente } from "./MiComponente"

🔗 Integración con Next.js

Opción A: Copiar componentes (estilo shadcn)

  1. Copia la carpeta src/components a tu proyecto Next.js
  2. Copia src/lib/utils.ts
  3. Copia los estilos de tailwind.config.js a tu configuración
  4. Importa los estilos en tu globals.css

Opción B: Enlace local con npm (para desarrollo)

  1. En la carpeta de tu librería:
npm link
  1. En tu proyecto Next.js:
npm link mi-libreria-ui
  1. Importa los componentes:
import { Button } from "mi-libreria-ui"

📚 Comandos Útiles

| Comando | Descripción | |---------|-------------| | npm run storybook | Inicia Storybook en modo desarrollo | | npm run build-storybook | Genera Storybook estático para deploy |

🤔 Preguntas Frecuentes

¿Qué es la función cn()?

Es una utilidad que combina clases de Tailwind de forma inteligente. Por ejemplo:

cn("p-2", "p-4")  // → "p-4" (resuelve el conflicto)
cn("base", isActive && "active")  // Agrega "active" solo si isActive es true

¿Qué es forwardRef?

Permite que tu componente pueda recibir una ref de React. Esto es útil para:

  • Enfocar elementos (inputRef.current.focus())
  • Medir dimensiones
  • Integrar con otras librerías

¿Por qué TypeScript?

TypeScript te ayuda a:

  • Detectar errores antes de ejecutar el código
  • Tener autocompletado en tu editor
  • Documentar tus componentes automáticamente

¡Feliz desarrollo! 🚀