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

@clowk/phlex

v0.1.3

Published

Behavior + styles for clowk-phlex — Stimulus controllers and the precompiled stylesheet for the clowk-phlex Ruby gem's chart components.

Readme

@clowk/phlex

The behavior + styles half of clowk-phlex — Stimulus controllers, Turbo actions, and a precompiled stylesheet for the Phlex chart components.

clowk-phlex is a dual-artifact UI library. The markup ships as a Ruby gem (clowk-phlex); this npm package ships the behavior and styles. They are version-locked and meet only at runtime through data-* attributes.

| Artifact | Registry | Ships | | --- | --- | --- | | clowk-phlex | RubyGems | Phlex view components (SVG/HTML markup) — view only | | @clowk/phlex | npm | Stimulus controllers + Turbo actions + precompiled core.css |

Install

pnpm add @clowk/phlex
// your Stimulus entrypoint
import { registerClowkPhlex } from "@clowk/phlex"

registerClowkPhlex(application)

Styles

dist/core.css is a self-contained, preflight-free stylesheet with everything wrapped in @layer clowk (tokens stay unlayered). Include it once.

If you run Tailwind yourself (e.g. a Rails/Tailwind app), declare the cascade layer order so clowk sits between base and utilities, then import it:

@layer theme, base, components, clowk, utilities;

@import "tailwindcss";
@import "@clowk/phlex/core";

The position matters in both directions: clowk must be above base so the library's own utilities beat Tailwind's preflight resets (otherwise .border-clowk-border loses to the *{border:0 solid} reset and renders a white currentColor border), and below utilities so its generic .fixed/.hidden never override your app's own responsive variants. Only an explicit @layer statement can place it in the middle — importing "before" or "after" can't.

If you don't run Tailwind, just link/import it as a plain stylesheet — it carries the tokens plus the utilities the components use (no reset; bring your own box-sizing if you need one).

registerClowkPhlex(application) registers every controller the chart components emit (metrics-chart, metrics-display, metrics-display-settings, metrics-section, time-range-filter, panel-options, number-card, dropdown, popover). The Ruby gem renders the matching data-controller markup; you don't wire anything up by hand.

What's in the box

  • dist/clowk-phlex.js — the Stimulus controllers + registerClowkPhlex, bundled with esbuild. Stimulus / Turbo / sortablejs are kept external (peer deps).
  • dist/core.css — the design tokens (--clowk-*) plus every utility class the Phlex components emit, precompiled by scanning the gem's components. Consumers need no Tailwind @source of the gem.

Theming

Override the --color-clowk-* / --clowk-* tokens to retheme without touching Ruby:

:root {
  --color-clowk-accent: #5b8def;
  --color-clowk-surface: #12151c;
}

Peer setup

Bring your own @hotwired/stimulus (and @hotwired/turbo-rails if you use the Turbo stream actions). sortablejs is used for drag-to-resize and is external too.

License

MIT © Thadeu Esteves