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

@_mehrad/halftone

v0.3.1

Published

Web components built with Lit, styled after Sentry, PostHog, Sentinel and Taskscape. Human and agent friendly. Use as a package or copy components into your project with `halftone add`.

Readme

Halftone

Web components built with Lit, styled between Sentinel and Taskscape: cool violet-tinted neutrals, a deep violet accent, sharp corners, display + mono type, one faint halftone dot screen on headers. Works in any framework or none. Human and agent friendly.

Package: @_mehrad/halftone · Tag prefix: ht- · Docs: mehrad-meraji.github.io/halftone (the docs site, in site/) and Storybook (npm run dev locally) · API for tools: custom-elements.json, llms.txt · Licence: MIT

Use it (package mode)

npm i @_mehrad/halftone lit
<link rel="stylesheet" href="node_modules/@_mehrad/halftone/dist/tokens.css" />
<script type="module">
  import '@_mehrad/halftone'; // everything, or one component:
  // import '@_mehrad/halftone/components/button/button';
</script>
<ht-button variant="primary">Deploy It</ht-button>

Components: 82 elements, from ht-button and ht-input to ht-menu, ht-table, ht-timeline and ht-dropzone. Run npx @_mehrad/halftone list for the full set. tokens.css is required.

Fonts are not bundled. Load Chakra Petch (display), Geist (UI) and IBM Plex Mono (mono) yourself, or system fallbacks are used. The Storybook docs load them from Google Fonts (.storybook/preview-head.html).

Theme by overriding --ht-* CSS variables (dark mode follows the OS, or set data-theme). Restyle internals through ::part(). The full guide is in Storybook under Guide / Getting Started.

Install from GitHub

Until (or instead of) the npm release, install straight from the repository. It builds itself on install, which takes about 20 seconds:

npm i github:mehrad-meraji/halftone lit

Pin a commit or tag for repeatable installs (github:mehrad-meraji/halftone#<commit>). The copy CLI works the same way: npx github:mehrad-meraji/halftone add button.

Icons

Icons are Phosphor (MIT). ht-icon ships 50 common ones in regular, bold and fill:

<ht-icon name="arrow-right" weight="bold"></ht-icon>
<ht-button><ht-icon slot="prefix" name="plus" weight="bold"></ht-icon>New Issue</ht-button>

It sizes itself in em, so it follows the text around it (size="24" or any CSS length overrides). It is decorative unless you give it a label. For any of the other ~1,500 icons or the thin, light and duotone weights, register them from @phosphor-icons/core:

import { registerIcons } from '@_mehrad/halftone';
import fire from '@phosphor-icons/core/assets/regular/fire.svg?raw';
registerIcons({ fire: { regular: fire } });

Own it (copy mode)

Every component is one file that imports only lit. Copy the ones you want into your project and edit them freely:

npx @_mehrad/halftone add button input tabs      # components + tokens.css
npx @_mehrad/halftone add --all                  # everything
npx @_mehrad/halftone list                       # what exists
npx @_mehrad/halftone diff                       # which of your copies drifted

Files land in src/components/halftone/ (or components/halftone/) and a halftone.json records the choices. TypeScript is copied when a tsconfig.json exists, readable JavaScript with comments otherwise (--ts / --js to force). Existing files you edited are never overwritten without --overwrite; --dry-run shows the plan. Add lit yourself, or pass --install.

After copying you own the code: there is no runtime dependency on this package, and upgrades are a halftone diff plus your own merge.

Blocks

Blocks are ready-made page sections, like shadcn/ui blocks. There are 20: sign-in, app shell, settings, dashboard, record list and detail, activity feed, members, inbox, comments, board, notice card, search home and results, media grid, wizard, setup steps, status, log viewer and invoice. Each is plain HTML that composes ht-* elements, so it works in any framework or none.

npx @_mehrad/halftone list                 # blocks are listed after the components
npx @_mehrad/halftone show login-01        # print a block's notes and HTML
npx @_mehrad/halftone add login-01         # copy the block and every component it uses

A block lands in <dir>/blocks/ as two files: <name>.html and <name>.md. The notes say when to use the block, how to adapt it and what not to do. They are written for agents as much as people, and llms.txt carries them too, so an agent starts from the closest block instead of composing from scratch.

To add or tune a block, edit src/blocks/<name>/. The rules are in AGENTS.md; npm run registry checks them.

Develop

npm run dev        # Storybook on :6006
npm run build      # dist/, custom-elements.json and the copy registry
npm test           # CLI tests (rebuilds the registry first)
npm run typecheck

For agents

custom-elements.json (Custom Elements Manifest) lists every tag, attribute, slot, part, CSS variable and event. Read it instead of guessing. See AGENTS.md for the component rules.