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

@duochat/icons

v0.1.31

Published

SVG icon library for DuoChat: React components with barrel and per-icon package exports (@duochat/icons/IconName).

Downloads

1,190

Readme

@duochat/icons

A clean, customizable SVG icon library for DuoChat — TypeScript-first, tree-shakeable React components, zero runtime dependencies beyond React.

Each icon ships as its own file under dist/ with matching package.json exports subpaths (for example @duochat/icons/SendIcon). The root entry still re-exports every icon for barrel imports.

Installation

npm install @duochat/icons
yarn add @duochat/icons
pnpm add @duochat/icons
bun add @duochat/icons

React (≥ 17) is a peer dependency — make sure it is already in your project.

Local preview (this repo)

After cloning, run npm install, then npm run build:icons (if you changed SVGs), then start the gallery:

npm run preview

Opens a Vite page that lists every generated icon from src/components with search, color, size, and stroke width controls.


Usage

Barrel import (named exports)

Best when you use many icons from one file; bundlers can still tree-shake unused exports in most setups.

import { SendIcon, MessageIcon, MicIcon } from "@duochat/icons";

export default function ChatBar() {
  return (
    <div>
      <MicIcon />
      <MessageIcon size={20} color="#6366f1" />
      <SendIcon size={24} strokeWidth={2} />
    </div>
  );
}

Per-icon import (default export)

Each icon is addressable as @duochat/icons/<ComponentName>. The name matches the React component (PascalCase + Icon suffix, e.g. SendIcon, MicIcon).

import SendIcon from "@duochat/icons/SendIcon";
import MicIcon from "@duochat/icons/MicIcon";

CommonJS:

const SendIcon = require("@duochat/icons/SendIcon");

IconProps and other types stay on the package root:

import type { IconProps } from "@duochat/icons";

Props

Every icon accepts standard SVG props plus these shortcuts:

| Prop | Type | Default | Description | |----------------|----------|-------------------|--------------------------------------------------| | size | number | varies by SVG | Width and height in px | | color | string | "currentColor" | Fill or stroke color (inherits from CSS) | | strokeWidth | number | varies by icon | Stroke width (stroke / mixed icons) |

Any extra prop (for example className, onClick, aria-label) is forwarded to the underlying <svg>.


Available icons

Icons are generated from public/icons/. Every component in src/components/ is exported from @duochat/icons and has a deep import path @duochat/icons/<SameExportName>.

| Component | Barrel import | Per-icon import | |------------------|---------------|-----------------| | MessageIcon | import { MessageIcon } from "@duochat/icons" | import MessageIcon from "@duochat/icons/MessageIcon" | | MicIcon | import { MicIcon } from "@duochat/icons" | import MicIcon from "@duochat/icons/MicIcon" | | PaperclipIcon | import { PaperclipIcon } from "@duochat/icons" | import PaperclipIcon from "@duochat/icons/PaperclipIcon" | | SearchIcon | import { SearchIcon } from "@duochat/icons" | import SearchIcon from "@duochat/icons/SearchIcon" | | SendIcon | import { SendIcon } from "@duochat/icons" | import SendIcon from "@duochat/icons/SendIcon" | | SettingsIcon | import { SettingsIcon } from "@duochat/icons" | import SettingsIcon from "@duochat/icons/SettingsIcon" | | ThumbsUpIcon | import { ThumbsUpIcon } from "@duochat/icons" | import ThumbsUpIcon from "@duochat/icons/ThumbsUpIcon" | | XIcon | import { XIcon } from "@duochat/icons" | import XIcon from "@duochat/icons/XIcon" |

After npm run build, see package.jsonexports for the full list of subpaths.


Adding new icons

  1. Add your .svg under public/icons/ (prefer a 24×24 viewBox; stroke or fill as exported from your design tool).
  2. Run:
npm run build

This regenerates src/components/*.tsx, src/index.ts, package.json exports, and the Rollup output under dist/ (including per-icon .js, .esm.js, and .d.ts files).


Contributing

  1. Fork the repo.
  2. Add your SVG to public/icons/.
  3. Run npm run build to regenerate components and exports.
  4. Open a pull request.

Publishing to npm

# One-time: log in to npm
npm login

# Bump version, build, publish
npm version patch   # or minor / major
npm publish --access public

prepublishOnly runs npm run build, which regenerates icons, package.json exports, and dist/ before publish.


License

MIT