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 🙏

© 2025 – Pkg Stats / Ryan Hefner

anima-ds-nucleus

v1.0.2

Published

Anima Design System - A comprehensive React component library

Readme

anima-ds-nucleus

Anima DS es una librería de componentes React (Design System) que incluye:

  • Atoms / Inputs / Layout / DataDisplay / Views listas para usar.
  • Soporte de i18next / react-i18next.
  • Componentes avanzados como tablas (MUI DataGrid) y gráficos (ApexCharts).

Instalación

npm install anima-ds-nucleus

Además, el proyecto que la use debe tener instaladas (peer dependencies):

npm install react react-dom

Dependencias por componente

⚠️ IMPORTANTE: Algunos componentes requieren dependencias adicionales:

| Componente | Dependencias Requeridas | |------------|------------------------| | Input, Select, Textarea, DatePicker, FileUpload | i18next, react-i18next | | DBGrid | @mui/material, @mui/x-data-grid, @emotion/react, @emotion/styled, i18next, react-i18next | | AreaChart, BarChart, LineChart, PieChart, DonutChart, ColumnChart | apexcharts, react-apexcharts | | LoginForm, ChangePasswordForm, Chat | i18next, react-i18next | | Sidebar, Header | i18next, react-i18next |

Componentes que requieren @heroicons/react: Icon (y todos los componentes que usan Icon internamente: Breadcrumbs, Sidebar, Accordion, Drawer, Dropdown, Pagination, Stepper, EmptyState, StatCard, Timeline, Toast, Chat).

Componentes que NO requieren dependencias extra: Button, Card, Badge, Typography, Modal, Tabs, Avatar, Spinner, Progress, Divider, Skeleton, Tooltip, Alert, List, TagList, Layout.

Instalación completa (si usas todos los componentes):

# Instalar la librería
npm install anima-ds-nucleus

# Instalar todas las dependencias opcionales
npm install @heroicons/react i18next react-i18next @mui/material @mui/x-data-grid @emotion/react @emotion/styled apexcharts react-apexcharts

Nota: Estas dependencias son "peer dependencies" - deben estar instaladas en tu proyecto si usas los componentes que las requieren. Esto evita duplicación y reduce el tamaño del bundle.

Requisitos de integración

  • React 18 o superior en el proyecto que consume la librería.
  • Tailwind CSS configurado - Los componentes usan clases de Tailwind. Debes tener Tailwind instalado y configurado en tu proyecto.
  • Importar los estilos - Después de instalar, importa los estilos en tu entry point:
    import 'anima-ds-nucleus/styles';
    // O si prefieres importar manualmente:
    import 'anima-ds-nucleus/dist/anima-ds-nucleus.css';
  • Internacionalización con i18next - Si usas componentes que requieren i18n, debes configurar i18next con las keys de traducción. La librería incluye traducciones en es-AR y pt-BR que puedes usar como referencia. Ver sección "Configuración de i18n" abajo.

Uso básico

// Importar estilos (IMPORTANTE)
import 'anima-ds-nucleus/styles';

// Importar componentes
import { Button, Layout, Card, I18nProvider } from 'anima-ds-nucleus';

function App() {
  return (
    <I18nProvider language="es-AR">
      <Layout>
        <Card title="Ejemplo">
          <Button tipo="Primary" color="Teal">
            Click aquí
          </Button>
        </Card>
      </Layout>
    </I18nProvider>
  );
}

También puedes usar el API más típico:

<Button variant="Primary">Enviar</Button>

Ejemplo de uso en un proyecto demo (Button)

Supongamos un proyecto React creado con Vite o Create React App.
Luego de instalar la librería y React, puedes usar el Button así:

// src/App.jsx
import React from 'react';
// Importar estilos primero
import 'anima-ds-nucleus/styles';
import { Button } from 'anima-ds-nucleus';

function App() {
  const handleClick = () => {
    alert('Botón de Anima DS clickeado');
  };

  return (
    <div style={{ padding: '2rem' }}>
      <h1>Proyecto Demo con Anima DS</h1>
      <Button variant="Primary" onClick={handleClick}>
        Usar Button de la librería
      </Button>
    </div>
  );
}

export default App;

Y en el entry point del proyecto (main.jsx o index.jsx):

import React from 'react';
import ReactDOM from 'react-dom/client';
import App from './App';

ReactDOM.createRoot(document.getElementById('root')).render(
  <React.StrictMode>
    <App />
  </React.StrictMode>
);

Configuración de Tailwind CSS

IMPORTANTE: Esta librería requiere Tailwind CSS configurado en tu proyecto. Los componentes usan clases de Tailwind directamente.

  1. Instala Tailwind en tu proyecto:

    npm install -D tailwindcss postcss autoprefixer
    npx tailwindcss init -p
  2. Configura tailwind.config.js para incluir los componentes de Anima DS:

    content: [
      "./src/**/*.{js,jsx}",
      "./node_modules/anima-ds-nucleus/**/*.{js,jsx}", // Agregar esta línea
    ],
  3. Importa los estilos de Anima DS en tu main.jsx o index.js:

    import 'anima-ds-nucleus/styles';

Configuración de i18n (Internacionalización)

Si usas componentes que requieren i18n (Input, Select, DBGrid, LoginForm, etc.), necesitas configurar i18next en tu proyecto.

Opción 1: Usar el I18nProvider de la librería (recomendado)

import { I18nProvider } from 'anima-ds-nucleus';

function App() {
  return (
    <I18nProvider language="es-AR">
      {/* Tu app */}
    </I18nProvider>
  );
}

Opción 2: Configurar tu propio i18next La librería espera estas keys de traducción (puedes ver todas en node_modules/anima-ds-nucleus/src/i18n/config.js):

  • form.* (email, password, login, etc.)
  • placeholder.* (email, password, search, etc.)
  • table.* (id, name, email, role, etc.)
  • nav.* (home, dashboard, profile, etc.)
  • chat.* (typeMessage, send, etc.)

Notas importantes

  • Los componentes que usan i18n fallarán si i18next no está configurado - Asegúrate de usar I18nProvider o configurar tu propio i18next antes de usar esos componentes.
  • Dependencias como peer dependencies - MUI, ApexCharts, i18next son "peer dependencies". Debes instalarlas en tu proyecto si usas los componentes que las requieren. Esto evita duplicación y reduce el tamaño del bundle.

Scripts de desarrollo

  • npm run dev: entorno de desarrollo con Vite.
  • npm run build: build de la librería (ESM + CJS en dist/).
  • npm run storybook: arranca Storybook con todos los componentes.