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

clarus-react

v1.0.0

Published

Wrapper React fino para o Clarus CSS — componentes que aplicam data-cl/classes e delegam pro JS vanilla existente (clarus-css/js), sem reimplementar comportamento.

Readme

clarus-react

Wrapper React fino para o Clarus CSS — cada componente aplica data-cl/classes e delega comportamento (foco, teclado, posicionamento, overlay) inteiramente pro JS vanilla já existente em clarus-css/js/*. Não reimplementa nada: os componentes deste pacote só instanciam a classe vanilla correspondente sobre o elemento que o React renderiza, e a desfazem (dispose()) no unmount.

Só React nesta versão. Vue/Svelte ficam de fora até haver uso real validando o padrão — este pacote serve de molde pra replicar depois.

Cobertura parcial, deliberada: Modal, Dropdown e Tabs — os dois formatos de contrato que os demais componentes de clarus-js seguem (gatilho+painel vs. raiz única), suficientes pra provar o padrão. Os demais componentes seguem o mesmo molde; abra uma issue se precisar de um específico.

Instalação

npm install clarus-react clarus-css react react-dom

Modal

import { ModalTrigger, ModalPanel } from "clarus-react";

function Example() {
  return (
    <>
      <ModalTrigger target="#meu-modal" className="cl-btn cl-btn-primary">
        Abrir modal
      </ModalTrigger>

      <ModalPanel id="meu-modal">
        <div className="cl-modal-header">
          <h3 className="cl-modal-title">Título</h3>
        </div>
        <div className="cl-modal-body">Conteúdo do modal.</div>
      </ModalPanel>
    </>
  );
}

Dropdown

import { DropdownTrigger, DropdownMenu } from "clarus-react";

function Example() {
  return (
    <div className="cl-dropdown">
      <DropdownTrigger target="#meu-menu" className="cl-btn" placement="bottom" align="start">
        Opções
      </DropdownTrigger>
      <DropdownMenu id="meu-menu">
        <a href="#" className="cl-dropdown-item">Editar</a>
        <a href="#" className="cl-dropdown-item">Excluir</a>
      </DropdownMenu>
    </div>
  );
}

Tabs

import { TabList } from "clarus-react";

function Example() {
  return (
    <>
      <TabList>
        <a href="#" className="cl-nav-link is-active" data-cl-target="#perfil">Perfil</a>
        <a href="#" className="cl-nav-link" data-cl-target="#seguranca">Segurança</a>
      </TabList>
      <div className="cl-tab-content">
        <div className="cl-tab-pane is-active" id="perfil">Conteúdo Perfil.</div>
        <div className="cl-tab-pane" id="seguranca">Conteúdo Segurança.</div>
      </div>
    </>
  );
}

Limitação conhecida

TabList (e, em geral, qualquer wrapper sobre um componente vanilla que lê seus filhos uma vez na construção) não re-escaneia sozinho se a lista de filhos mudar dinamicamente depois do mount. Troque a prop key do componente pra forçar um remount quando a lista de abas mudar de verdade.

Licença

MIT