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

@ivds/react

v1.0.0

Published

React components for the Ivoire Design System

Readme

@ivds/react

Composants React du Ivoire Design System. Ce package fournit des composants types avec TypeScript, accessibles par defaut, et prets pour les interfaces institutionnelles.

Installation

yarn add @ivds/react @ivds/core @ivds/design-tokens

Prerequis : React >= 18.2.0


Demarrage rapide

// 1. Importer les styles Core
import '@ivds/core';

// 2. Envelopper votre app avec le ThemeProvider
import { ThemeProvider } from '@ivds/react/theme';
import { Button, Card, TextInput } from '@ivds/react';

function App() {
  return (
    <ThemeProvider mode="light">
      <Card variant="elevated">
        <Card.Header><h2>Mon formulaire</h2></Card.Header>
        <Card.Body>
          <TextInput label="Nom" placeholder="Votre nom" />
          <Button variant="primary">Envoyer</Button>
        </Card.Body>
      </Card>
    </ThemeProvider>
  );
}

Composants disponibles

Formulaires

| Composant | Props principales | |-----------|-------------------| | Button | variant, size, loading, disabled, fullWidth, iconLeft, iconRight | | TextInput | label, type, error, success, helperText, iconLeft, multiline | | Checkbox | label, checked, disabled | | RadioButton | label, value, checked, disabled | | Select | label, options, value, onChange | | Switch | label, checked, onChange | | Tag | variant, size, closeable |

Mise en page

| Composant | Props principales | |-----------|-------------------| | Card | variant (elevated, flat, bordered), interactive, compact | | Modal | open, onClose, title, size | | Tabs | activeTab, onChange, items | | Alert | variant (success, warning, error, info), closeable | | Badge | variant, size | | Notification | variant, title, closeable | | Breadcrumb | items |

Structure

| Composant | Props principales | |-----------|-------------------| | Header | sticky, glass, dark | | Header.Brand | Logo et nom du site | | Header.Nav | Liens de navigation | | Footer | Pied de page multi-sections | | Navigation | items, activeItem |

Utilitaires

| Composant | Description | |-----------|-------------| | Box | Conteneur generique avec props de spacing | | Flex | Conteneur flexbox | | Grid | Conteneur grille CSS |


Composants gouvernementaux

Les composants gov sont conçus pour les portails publics ivoiriens, avec support bilingue natif :

import {
  GovShell,
  GovHeader,
  GovLanguageSwitcher,
  GovPrimaryNav,
  GovTopPromo,
  GovFlashTicker,
  GovServiceDirectory,
  GovNewsPanel,
  GovAgendaPanel,
  GovMegaFooter,
} from '@ivds/react/gov';

Exemple complet

function PortailGouv() {
  return (
    <GovShell locale="fr">
      <GovHeader siteName="Portail des Services Publics">
        <GovLanguageSwitcher currentLang="fr" />
      </GovHeader>
      <GovPrimaryNav items={navigation} />
      <GovTopPromo
        title="Bienvenue sur le portail des services publics"
        cta={{ label: 'Decouvrir nos services', href: '/services' }}
      />
      <main>
        <GovServiceDirectory services={services} />
        <GovNewsPanel articles={actualites} />
      </main>
      <GovMegaFooter columns={footer} />
    </GovShell>
  );
}

Theming

Modes clair et sombre

import { ThemeProvider, useTheme } from '@ivds/react/theme';

function App() {
  return (
    <ThemeProvider mode="light">
      <MonContenu />
    </ThemeProvider>
  );
}

function BoutonTheme() {
  const { mode, setMode } = useTheme();
  return (
    <Button onClick={() => setMode(mode === 'light' ? 'dark' : 'light')}>
      Mode {mode === 'light' ? 'sombre' : 'clair'}
    </Button>
  );
}

Tokens personnalises

Pour adapter les couleurs a votre ministere :

<ThemeProvider
  mode="light"
  tokens={{
    '--color-brand-primary-500': '#1a6bdb',
    '--color-brand-primary-600': '#1058b8',
    '--color-brand-primary-700': '#0b4593',
  }}
>
  {children}
</ThemeProvider>

Accessibilite

Tous les composants suivent les bonnes pratiques WCAG 2.2 AA :

  • aria-disabled, aria-busy, aria-invalid sur les champs
  • aria-label et aria-labelledby sur les elements interactifs
  • aria-current="page" sur la navigation active
  • role="dialog" avec focus trapping sur Modal
  • Navigation clavier complete (Tab, Fleches, Entree, Echap)
  • Focus visible sur tous les elements interactifs

Storybook

Lancez le Storybook pour explorer les composants en action :

yarn dev:react   # Port 6008

Le Storybook inclut des pages de documentation sur les tokens (couleurs, typographie, espacement) dans la section "Fondations".

Licence

MIT