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

react-carbon-icons

v1.0.0

Published

Optimized SVG icons from the IBM Carbon design system for React

Downloads

6

Readme

React Carbon Icons

Optimized SVG icons from the IBM Carbon Design System for React. All the available icons in @carbon/icons have been optimized using SVGO, compressed using a simple format called CVG (my own creation), and then exported as tiny importable React components.

Installation

Pick your favorite flavor:

npm install --save react-carbon-icons
yarn add react-carbon-icons
pnpm add react-carbon-icons
bun add react-carbon-icons

Usage

There are two ways to use the icons. Either by the icon key using the default export, or by individually importing icons from the icons/ directory. The latter option is preferred for bundling and tree-shaking reasons.

Using <Icon />

The root-level component <Icon /> (which is the default export) will give you access to all the available icons using their "name". The names are all kebab-case identifiers converted from the original files.

The Icon component accepts any properties that the <svg /> tag would accept.

import Icon from 'react-carbon-icons';

export function Foo() {
    return <p>
        Hello, <Icon name='earth-filled' /> World!
    </p>
}

The file react-carbon-icons/manifest contains all the keys and their path definitions. You can refer to the Reference Table for a complete list of them.

[!NOTE] The Icon component references the manifest file directly, which means depending on your bundler, you may end up bundling ALL the icons. This is why the individual import method is preferred.

Using Individual Imports

All of the icons are individually exported from single-file components within the react-carbon-icons/icons directory. Each filename is the same as the key. They are exported both as named components and as the default.

Refer to the Reference Table for a list of all the available icon keys and their exported identifier.

Why not @carbon/icons-react?

I personally found the quality of that library lacking. The SVG is not fully optimized and the package size is a bit too large for my taste.

CVG Compression

The idea behind the CVG compression format is to convert the SVG XML source into machine-readable JSON using as many short-hands and tuples as possible to reduce the file size of the images. This should result in a lossless conversion which is easy for JS to hydrate back into SVG.

An example of this is in how most icon files are single paths with a viewBox attribute on the SVG element. CVG handles this by having the minimum image definition being [string, string]. The first element is the viewBox definition, and the second being the path definition. Using this we can hydrate the full SVG again by bringing in the standard namespace and adding the path element.

In cases where the image is more complex, CVG allows for defining the contents of the image using tuples like [string, Record<string, string>]. These definitions are parsed as being the element tag, followed by an object describing the attributes and their values.

All together this keeps each icon lean-and-mean for bundling and transmission purposes. At the time of writing, the original source SVG folder is 2.23mb in size, while the entire manifest file containing those icons is about 780kb.

License

This package react-carbon-icons is licensed under the same license as the source material @carbon/icons which is Apache 2.0 License. The terms of this license are provided in the LICENSE file.