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

@terjeballestad/bob

v2.2.0

Published

Bob: a design system and component library for productivity tools

Readme

Bob

Bob is a design system and component library for productivity tools: React components, the CSS tokens they read, and a Tailwind entry that builds Bob's classes in your app. One dark theme. The Storybook at https://bob.godstemning.dev documents every component.

npm i @terjeballestad/bob

Add one line after your Tailwind v4 import (DD-031):

@import "tailwindcss";
@import "@terjeballestad/bob/tailwind.css";
import { Button, Chip, StatusDot } from '@terjeballestad/bob';

<Button variant="primary" size="sm" onClick={save}>Save</Button>
<Chip mono tone="green">admin</Chip>
<StatusDot state="live" color="var(--bg-green)" size={7} />

Your Tailwind build then writes Bob's component classes (btn, chip, card, ...) in its utilities layer, and only the ones in use. They take variants (md:btn-sm) and mix with your utilities: <Button className="px-8"> gets 32px of side padding over Bob's. The theme maps Bob's tokens, so bg-card, text-secondary, border-subtle, rounded-btn and font-mono work. The component import also loads Bob's webfonts.

Type is a class too: one text style sets the size, the line height, the letter spacing and the weight (DD-038). Write text-label text-muted, not text-caption font-medium and not text-[12px]. The styles are text-micro, text-tiny, text-id, text-label, text-caption, text-note, text-figure, text-body, text-subhead, text-item, text-base, text-heading, text-prose, text-title, text-headline and text-display; TOKENS.md says what each sets and is for. They sit on DD-039's ramp (11 to 24px, whole pixels), and none is 700. A style sets no family, so an id adds font-mono. Labels are sentence case. text-base is Bob's 13px body size, not Tailwind's 1rem.

Bob 2.0 applies DD-039's design principles: four surface levels, cards edged by a soft shadow and not a border, one accent, 13px UI text, and the motion rules. docs/migration-2.0.md lists what an app changes. Bob 2.1 takes DD-041's component choices (CHANGELOG.md).

  • Preflight. Bob's components and Storybook assume Bob's own reset, not Tailwind's preflight. With preflight, text sits at line-height 1.5. To keep Bob's look, import the theme and the utilities only:

    @layer theme, base, components, utilities;
    @import "tailwindcss/theme.css" layer(theme);
    @import "tailwindcss/utilities.css" layer(utilities);
    @import "@terjeballestad/bob/tailwind.css";
  • Your element rules go in @layer base. An unlayered button { color: inherit } beats every class in a layer, Bob's too.

react, react-dom and @types/react 18.3 or later are peer dependencies. The types are a required peer, because Bob's declarations import React's types, and npm must place them where Bob can see them.

Layout

src/
  index.ts               barrel: every component and its prop types
  types.ts               DSOption / DSOptionInput, for SegToggle
  styles.css             the precompiled stylesheet (dist/bob.css), in the base layer
  tailwind.css           the Tailwind entry (dist/tailwind.css): tokens, theme, @utility classes
  tailwind/              theme.css (@theme over the tokens), components.css and one file of
                         @utility classes per group: core, forms, feedback, lists
  tokens/                colors, typography, layout, fonts, base (reset + focus ring)
  components/           clickable.ts: the keyboard props for a clickable div (Card, ListRow)
    core/                Avatar Button Card Chip IconButton Kbd ProgressBar SegToggle StatusDot
    forms/               FormRow Input SearchInput Select (and its parts) Textarea
    feedback/            Modal Toast (ToastStack, createToastManager, useToastManager)
    lists/               ListRow NavRow SectionLabel
TOKENS.md                what each CSS custom property means

Conventions

  • Each component renders Bob's component classes, in the daisyUI style: btn btn-md btn-primary, chip chip-green, card card-action. Each class is a Tailwind @utility in src/tailwind/<group>.css. The rules read the tokens as var(--token), never a generated class. TOKENS.md lists every token. Hover is a CSS :hover rule. No component keeps state, except what Base UI keeps for Select and ToastStack.
  • Class names have no prefix. A component writes each class name whole in its source, so Tailwind finds it when it scans dist/index.js. Tailwind sorts utilities by the properties they set, so test/tailwind.test.tsx checks that a modifier (btn-primary) comes after its base (btn).
  • Overrides. Components that wrap a native element (Button, IconButton, Chip, Input, Textarea, SearchInput) take className and forward every other attribute of that element. Select's parts take className and Base UI's props. The other components take a style prop.
  • One dark theme. There is no light mode and no theme switcher yet.
  • Icons come from the app (DD-042). The app installs lucide-react and passes its icons to Icon, Button's and NavRow's icon and IconButton's icon; Bob draws them at 14 or 16px, stroke 2, in the text's colour. Bob does not depend on lucide-react. Bob draws the status shapes itself (StatusDot shape), and its own glyphs (search, chevron, check, close) follow Lucide's geometry; LICENSE-lucide.txt holds Lucide's notice.
  • Fonts come from Google Fonts through an @import in tokens/fonts.css: Schibsted Grotesk and JetBrains Mono.

Develop

npm install
npm test           # builds dist/, then runs the export and render tests
npm run typecheck  # also checks every exported type through the package name

npm test checks the built package, not the source: the exports match Bob's original barrel, every class a component renders is defined in bob.css, and dist/index.js imports bob.css. test/tailwind.test.tsx builds a Tailwind app with dist/tailwind.css and checks that it writes every class the components render.

Storybook and screenshot tests

npm run storybook          # http://localhost:6106 (6006 is Godot's debug adapter port)
npm run build-storybook    # static build in storybook-static/
npm run test:visual:docker # one screenshot per story, in the Playwright Linux image

Each component has a docs page (stories/<group>/<Component>.mdx): purpose, when to use it and when not, props, states and accessibility, with its stories in <Component>.stories.tsx. The blocks the pages share are in stories/docs/blocks.tsx. .storybook/theme.ts gives Storybook Bob's look, from the tokens.

Write a story as an app writes the component: plain JSX, one element per variant, and Tailwind utilities on layout wrappers (<div className="flex gap-2.5">). .storybook/tailwind.css builds those utilities from the story files. "Show code" prints the rendered JSX. A story with state sets parameters.docs.source.code to its usage instead.

Stories with a play function are interaction tests. visual/play.visual.ts plays each one in the built Storybook and fails when Storybook reports an error; it runs with the screenshot tests.

The screenshot test opens every story in the built Storybook and compares it with a baseline in visual/__screenshots__/, with no pixel tolerance. Baselines come from the Playwright Linux image, never from macOS, because fonts render differently. CI uses the same image. Build the Storybook first.

When you change how a component looks on purpose, take new baselines and commit them with the change, so the review shows the before and after:

npm run build-storybook && npm run test:visual:docker -- --update-snapshots

A new story fails until it has a baseline. The image version in package.json and ci.yml must match the installed @playwright/test.

Release

Bump the version in a commit, then push a tag v<version>. GitHub Actions runs the tests and publishes to npm with trusted publishing, so no one types an OTP. A change to a prop or a token name is a major version.

Provenance

Bob 0.1.0 is client/src/ds/ from Time Turtle at commit bb93eea, moved with no change to a component, a style or a token. Only this README is new: the old one said that styling was inline and that hover was component state, which was no longer true of the code.

Before that, the components were unpacked from _ds_bundle.js, a prebuilt IIFE that read window.React and exported through a window.PMBoardDesignSystem_cdbc5e namespace (Time Turtle SB-006). Behavior and every style value carried over unchanged. The ui_kits/pm-board demo app in the bundle was dropped, because nothing imported it.