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

moby-accessibility

v1.0.0

Published

A reusable React component library with accessibility

Readme

Moby Accessibility

Una biblioteca de componentes reutilizables en React con TypeScript, enfocada en accesibilidad, construida con shadcn/ui y react-aria.

Características

  • 🎨 Componentes estilizados con shadcn/ui - Diseño moderno y personalizable
  • Accesibilidad con react-aria - Cumple con estándares WCAG 2.1 AA
  • 🌓 Soporte para Dark Mode - Tema claro y oscuro incluidos
  • 📦 Bundle optimizado con tsup - Salidas ESM, CJS y tipos TypeScript
  • 🎯 Compatible con Tailwind CSS - Integración perfecta con tu configuración existente
  • 📚 Documentación con Storybook - Explora componentes interactivamente
  • Testing con Vitest - Tests unitarios con React Testing Library

Instalación

npm install moby-accessibility
# o
yarn add moby-accessibility
# o
pnpm add moby-accessibility

Configuración

1. Importar estilos CSS

En tu archivo CSS principal o en el punto de entrada de tu aplicación:

@import 'moby-accessibility/dist/index.css';

2. Configurar Tailwind CSS

Si aún no tienes Tailwind CSS configurado, necesitarás instalarlo. Si ya lo tienes, agrega nuestra biblioteca a tu configuración:

// tailwind.config.js
module.exports = {
  content: [
    // ... tu contenido existente
    "./node_modules/moby-accessibility/**/*.{js,ts,jsx,tsx}",
  ],
  // ... resto de tu configuración
}

Uso

Button

import { Button } from 'moby-accessibility'

function App() {
  return (
    <Button variant="default" size="default" onPress={() => console.log('Clicked!')}>
      Click me
    </Button>
  )
}

Props del Button

  • variant: 'default' | 'destructive' | 'outline' | 'secondary' | 'ghost' | 'link'
  • size: 'default' | 'sm' | 'lg' | 'icon'
  • asChild: boolean - Renderizar como componente hijo
  • isDisabled: boolean - Estado deshabilitado
  • Todas las props de AriaButtonProps de react-aria

Input

import { Input } from 'moby-accessibility'

function Form() {
  return (
    <Input
      label="Email"
      type="email"
      placeholder="[email protected]"
      description="Ingresa tu correo electrónico"
      isRequired
    />
  )
}

Props del Input

  • label: string - Etiqueta del campo
  • description: string - Texto de ayuda
  • error: boolean - Estado de error
  • errorMessage: string - Mensaje de error
  • Todas las props de AriaTextFieldProps de react-aria

Dialog

import {
  Dialog,
  DialogContent,
  DialogDescription,
  DialogHeader,
  DialogTitle,
  DialogTrigger,
} from 'moby-accessibility'

function MyDialog() {
  return (
    <Dialog>
      <DialogTrigger asChild>
        <Button>Abrir Dialog</Button>
      </DialogTrigger>
      <DialogContent>
        <DialogHeader>
          <DialogTitle>Título del Dialog</DialogTitle>
          <DialogDescription>
            Descripción del contenido del dialog.
          </DialogDescription>
        </DialogHeader>
        {/* Contenido */}
      </DialogContent>
    </Dialog>
  )
}

Dark Mode

La biblioteca soporta dark mode automáticamente. Para activarlo, agrega la clase dark al elemento html o body:

<html class="dark">
  <!-- Tu aplicación -->
</html>

Desarrollo

Prerequisitos

  • Node.js >= 16
  • npm, yarn o pnpm

Instalación de dependencias

npm install

Scripts disponibles

# Modo desarrollo con hot reload
npm run dev

# Construir la biblioteca
npm run build

# Ejecutar tests
npm run test

# Ejecutar tests con UI
npm run test:ui

# Ejecutar Storybook
npm run storybook

# Construir Storybook
npm run build-storybook

# Linting
npm run lint

# Formateo de código
npm run format

# Type checking
npm run type-check

Estructura del proyecto

moby-accessibility/
├── src/
│   ├── components/        # Componentes React
│   │   ├── button/
│   │   ├── input/
│   │   └── dialog/
│   ├── lib/              # Utilidades
│   ├── styles/           # Estilos globales
│   └── index.ts          # Punto de entrada
├── tests/                # Tests unitarios
├── .storybook/          # Configuración de Storybook
└── example/             # Aplicación de ejemplo

Probar localmente con npm link

  1. En el directorio de la biblioteca:
npm run build
npm link
  1. En tu proyecto donde quieres usar la biblioteca:
npm link moby-accessibility
  1. Para desvincularlo cuando termines:
# En tu proyecto
npm unlink moby-accessibility

# En la biblioteca
npm unlink

Publicar en npm

  1. Asegúrate de estar logueado en npm:
npm login
  1. Actualiza la versión en package.json

  2. Construye la biblioteca:

npm run build
  1. Publica:
npm publish --access public

Contribuir

  1. Fork el repositorio
  2. Crea tu rama de feature (git checkout -b feature/amazing-feature)
  3. Commit tus cambios (git commit -m 'Add some amazing feature')
  4. Push a la rama (git push origin feature/amazing-feature)
  5. Abre un Pull Request

Licencia

MIT © [Tu nombre]