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

kiso-ui

v0.4.2

Published

Stimulus controllers for Kiso UI components

Readme

Add one gem and get badges, buttons, cards, alerts, and more. They all work with screen readers and dark mode.

No React. No extra build step. Just ERB with class_variants for styling.

[!WARNING] Kiso is in early development and not ready for production use. The gem is published to reserve the name on RubyGems. APIs, component names, and theme tokens will change without notice. Watch the repo or check back in a few weeks.

Getting started

Add the gem to your Gemfile and bundle:

# Gemfile
gem "kiso"
bundle install

Then add one import to your Tailwind CSS entrypoint:

/* app/assets/tailwind/application.css */
@import "../builds/tailwind/kiso.css";

And add the dark mode helper to your layout's <head>:

<head>
  <%= kiso_theme_script %>
  <%= stylesheet_link_tag "tailwind" %>
  <%= javascript_importmap_tags %>
</head>

That's it. Helpers, importmap pins, asset paths, dark mode tokens, and base body styles are all wired up automatically by the engine. See the Getting Started guide for the full walkthrough.

Bundler apps (esbuild, Vite, Bun)

If your app uses a JS bundler instead of importmaps, also install the npm package for Stimulus controllers:

npm install kiso-ui
// app/javascript/controllers/index.js
import KisoUi from "kiso-ui"
KisoUi.start(application)

Importmap apps get Stimulus controllers automatically — no npm install needed.

Usage

Use the kui() helper to render components:

<%= kui(:badge, color: :primary) { "Active" } %>

Components are made of small parts. A card has a header, title, content, and footer:

<%= kui(:card) do %>
  <%= kui(:card, :header) do %>
    <%= kui(:card, :title, text: "Members") %>
  <% end %>
  <%= kui(:card, :content) do %>
    ...
  <% end %>
<% end %>

How it works

Each component has two parts:

  1. A theme file in lib/kiso/themes/ — sets up variants, sizes, and colors
  2. An ERB partial in app/views/kiso/components/ — reads the theme and renders HTML

Colors use tokens like bg-primary and text-muted. They switch on their own in dark mode. No dark: classes needed.

Design system

Kiso follows a strict spatial system — consistent heights, padding, gaps, typography, border radius, and icon sizing across every component. See the Design System page for the visual reference.

Design principles

  1. Native HTML first. Use <dialog>, [popover], <details> before adding JavaScript.
  2. Build from small parts. Card = Header + Title + Content + Footer.
  3. ERB is enough. Use strict locals and yield for blocks.
  4. Tailwind classes in ERB. CSS files only hold transitions and pseudo-states.
  5. Theme with tokens. Names like primary map to real colors. They flip in dark mode.
  6. Works with Turbo. Use them in Turbo Frames and Streams.
  7. Stimulus only when needed. Native HTML handles the basics. Stimulus adds the rest.

Development

git clone --recurse-submodules https://github.com/steveclarke/kiso.git
cd kiso
bundle install
bin/dev

This starts Lookbook on port 4001 with a Tailwind watcher. Open http://localhost:4001/lookbook to browse previews.

Cloned without --recurse-submodules? Run bin/vendor init to fetch the vendor repos.

Run tests and lint:

bundle exec rake test             # Ruby tests
npm run test:unit                 # JS unit tests (Vitest)
npm run test:e2e                  # E2E tests (Playwright, needs bin/dev)
bundle exec standardrb            # Ruby lint
npm run lint && npm run fmt:check # JS lint + format check

See CONTRIBUTING.md to help out.

Project layout

app/views/kiso/components/   ERB partials
lib/kiso/themes/             Theme files (class_variants)
app/javascript/controllers/  Stimulus controllers (also shipped via npm as kiso-ui)
app/helpers/kiso/            kui(), kiso_prepare_options() helpers
app/assets/tailwind/kiso/   CSS (only transitions and pseudo-states)
lookbook/                    Lookbook dev app (previews on port 4001)
docs/                        Docs site (Bridgetown)

Requirements

Status

Early development. APIs, component names, and theme tokens may change.

License

MIT License. See MIT-LICENSE.