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

@dax-ui/chip

v0.8.0

Published

dax-ui Chip: status pills, tags and removable chips in outlined, soft, solid and glass styles

Readme

@dax-ui/chip

Compact labels for statuses, categories, tags and people. Four looks (outlined, soft, solid, and glass for dark or gradient backgrounds), seven preset colors or any CSS color, an optional icon or status dot, an accessible remove button, and click, toggle or link behavior.

Installation

pnpm add @dax-ui/chip

MUI and Emotion are included; the app only needs React 18 or 19.

One-time setup per app (skip if the app already uses dax-ui): install @dax-ui/theme and wrap the app in its UIProvider.

pnpm add @dax-ui/theme

Usage

import { Chip } from '@dax-ui/chip';
import { CalendarDays } from 'lucide-react';

// Status chips
<Chip label="Medium" color="success" dot />
<Chip label="Overdue" color="danger" />
<Chip label="Created by you" color="teal" />

// On a dark header
<Chip label="Event" variant="glass" />

// Removable (the button is named "Remove daniel Okafor")
<Chip label="daniel Okafor" color="teal" variant="solid" onDelete={() => remove(id)} />

// Filter toggle (aria-pressed)
<Chip label="Events" icon={<CalendarDays />} selected={on} onClick={() => setOn(!on)} />

// Link
<Chip label="Docs" href="/docs" variant="soft" color="info" />

// Any color, or single parts
<Chip label="Beta" color="#6d28d9" variant="solid" />
<Chip label="Custom" colors={{ background: '#fde68a', border: '#f59e0b', text: '#1e293b' }} />

Colors

| color | Use | | --- | --- | | neutral (default) | Plain tags | | brand | Dark teal, the modal headings and primary buttons | | teal | Accent teal, e.g. "Created by you", participants | | success, warning, danger, info | Statuses |

Presets have light- and dark-mode shades whose text passes 4.5:1 contrast. Any other CSS color derives the border and fills with color-mix(); check its contrast yourself. colors overrides single parts: text, background, border, icon, dot, hoverBackground, focusRing. They're CSS variables (--dax-chip-<key>), so you can also set them on an ancestor to recolor every chip inside it. CHIP_PALETTES and CHIP_DARK_PALETTES hold the preset shades.

Props

| Prop | Type | Default | Description | | --- | --- | --- | --- | | label (required) | ReactNode | | Text of the chip. Also its accessible name. | | aria-label | string | | Accessible name of a clickable chip or link, when the label alone isn't enough. | | className | string | | Class name on the root element. | | color | ChipPresetColor \| (string & {}) | neutral | A preset (neutral, brand, teal, success, warning, danger, info) or any CSS color, e.g. '#7c3aed', from which the text, border and fills are derived. Presets use the theme colors (teal is secondary); for a custom color, check contrast yourself. | | colors | Partial<ChipColors> | | Overrides any of the chip's colors, e.g. { border: '#14b8a6' }. Unset keys come from color and variant. | | deleteIcon | ReactNode | | Replaces the remove button's icon (a circled ×). | | deleteLabel | string | 'Remove <label>' (or 'Remove' when the label isn't text) | Accessible name of the remove button. | | disabled | boolean | false | Dims the chip and disables its buttons. | | dot | string \| boolean | false | A small dot before the label, e.g. for a status or priority. true uses the chip's color; a string is a CSS color for the dot. | | href | string | | Makes the chip a link to this URL. | | icon | ReactNode | | Icon before the label, e.g. <FlagIcon />. Decorative: hidden from screen readers. | | maxWidth | string \| number | | Longest the chip may grow, in px or any CSS length; longer labels end in "…". | | onClick | ((event: MouseEvent<HTMLElement, MouseEvent>) => void) | | Makes the chip a button, e.g. for filters. | | onDelete | ((event: MouseEvent<HTMLButtonElement, MouseEvent>) => void) | | Shows a remove button after the label, which calls this. | | selected | boolean | false | Marks a clickable chip as selected (a toggle, aria-pressed): it switches to the solid look. | | shape | "pill" \| "rounded" | pill | Corner style: a fully rounded pill or a rounded rectangle. | | size | "sm" \| "md" \| "lg" | md | Height: sm 22px, md 28px, lg 34px. | | style | CSSProperties | | Inline styles on the root element. | | sx | SxProps<Theme> | | Style overrides on the root element. | | target | string | | With href: where to open the link, e.g. '_blank'. | | variant | "outlined" \| "soft" \| "solid" \| "glass" | outlined | Visual style. glass ignores color except for the dot. |

Other HTML attributes (id, title, data-*, …) go to the root <span>, which also receives ref.