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

comark-chips

v0.9.1

Published

Links as chips with the site's favicon, and @user as a chip with their avatar, downloaded while parsing so readers ask no one. A Comark plugin.

Readme

comark-chips

npm version npm downloads license docs

Links and @user mentions as chips with the site's favicon or the person's avatar, as on antfu.me. A Comark plugin for HTML, Vue, React, and Svelte.

pnpm add comark comark-chips
import { createHtmlRenderer } from "@comark/html";
import chips, { components } from "comark-chips/html";

const render = createHtmlRenderer({ plugins: [chips()], components });

Write links and mentions as usual:

Moves the build to [Vite](https://vite.dev). Reviewed by @antfu.

Every web link becomes a chip with its site's favicon, and every @user a chip with their GitHub avatar that links to their profile. A link into a GitHub account or repository shows the account's avatar, and a link into an X, Bluesky, YouTube, or GitLab account shows theirs through unavatar.io. Relative links, links around images, and links written as HTML stay plain.

The images are downloaded while parsing and inlined as data URIs, so the page asks no other site for them. One that can't be downloaded stays a URL for the reader's browser to load. An avatar that answers with an HTTP error, such as an @user with no account, is reported in meta.issues.

Props

| Prop | Does | | --- | --- | | [Anthony](https://antfu.me){avatar="@antfu"} | Uses that GitHub account's avatar | | [Sindre](https://sindresorhus.com){avatar="bluesky:sindresorhus.com"} | Uses that account's avatar on any network unavatar.io knows | | [Nuxt](https://nuxt.com){avatar="https://…"} | Uses this image | | [guide](https://vite.dev/guide/){chip=false} | Keeps a plain link | | :chip[Comark]{href="https://comark.dev"} | Writes a chip directly |

Options

chips({ download: false }) keeps the image URLs instead of downloading them; use it where parsing runs in a browser. favicon: (host) => url and avatar: (login) => url change where the images come from, such as https://unavatar.io/github/${login}. cache: ".comark/chips" keeps the images in a folder you can commit, and cache: false keeps them in memory only. The docs cover caching in CI.

Renderers

| Renderer | Import | | --- | --- | | @comark/html | comark-chips/html: the styles are inlined | | @comark/vue | comark-chips/vue | | @comark/react | comark-chips/react | | @comark/svelte | comark-chips/svelte |

Each entry exports the parse plugin as default and the renderer's components. The Vue, React, and Svelte components add the styles when they mount; import comark-chips/style.css with your styles so a server-rendered page doesn't shift.

Customize

Chips follow shadcn/ui's Badge and the shared --comark-* tokens. A chip is an a.cp with data-kind="favicon" or data-kind="avatar", holding an img.cp-img. The rules sit in a comark CSS layer, so any plain rule of your own wins. --cp-background, --cp-ring, --cp-radius, and the other --cp-* variables change the fill, the ring, and the corners; see the chips' Theming page.

Docs and live demos: comark-ui.onmax.me/chips.