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

iconvaultkit

v1.1.0

Published

TypeScript client for searching and fetching icons from 200,000+ open-source icons across 100+ libraries

Readme

iconvaultkit

TypeScript client for searching and fetching icons from 200,000+ open-source icons across 100+ libraries — Material Design, Lucide, Heroicons, Phosphor, Tabler, Font Awesome, and more.

Zero dependencies. Works in Node.js, Bun, Deno, and the browser.

Install

npm install iconvaultkit

Quick start

import { searchIcons, getIconSvg, listCollections } from "iconvaultkit"

// Search across all libraries
const result = await searchIcons("home")
console.log(result.icons)
// ["mdi:home", "lucide:home", "heroicons:home", ...]

// Search within one library
const lucideResult = await searchIcons("arrow right", { collection: "lucide", limit: 5 })

// Get SVG markup
const svg = await getIconSvg("lucide", "home", { color: "#6366f1", size: 24 })
// <svg xmlns="http://www.w3.org/2000/svg" ...>...</svg>

// List all available libraries
const libraries = listCollections()
// [{ prefix: "mdi", name: "Material Design Icons" }, ...]

API

Standalone functions

import {
  searchIcons,
  getIconSvg,
  listCollections,
  getCollectionIcons,
  searchAndGetSvg,
  parseIconId,
} from "iconvaultkit"

searchIcons(query, options?)

Search icons by keyword.

| Option | Type | Default | Description | |---|---|---|---| | collection | LibraryPrefix | all libraries | Restrict to one library | | limit | number | 20 | Max results (max 100) | | start | number | 0 | Pagination offset |

Returns Promise<SearchResult> with { icons: string[], total: number, start: number, limit: number }.

getIconSvg(collection, name, options?)

Fetch the SVG markup for a specific icon.

| Option | Type | Default | Description | |---|---|---|---| | color | string | "currentColor" | Any CSS color value | | size | number | 24 | Sets width and height | | width | number | 24 | Width in pixels | | height | number | 24 | Height in pixels |

Returns Promise<string> — raw SVG markup.

listCollections()

Returns all available icon libraries as Collection[]{ prefix: string, name: string }[]. Synchronous, no network request.

getCollectionIcons(collection, options?)

Browse all icons in a specific library.

| Option | Type | Default | Description | |---|---|---|---| | limit | number | 200 | Max icons to return |

Returns Promise<string[]> — icon IDs in "collection:name" format.

searchAndGetSvg(query, searchOptions?, svgOptions?)

Convenience: search and immediately fetch the SVG of the top result. Returns Promise<{ iconId: string; svg: string } | null>.

parseIconId(iconId)

Parse "lucide:home" into { collection: "lucide", name: "home" }. Synchronous.

Class API

import { IconVaultKit } from "iconvaultkit"

// Use a custom base URL (e.g. your own Iconify proxy)
const client = new IconVaultKit({ baseUrl: "https://your-proxy.example.com" })

const result = await client.search("home", { collection: "lucide" })
const svg    = await client.getSvg("lucide", "home", { size: 32 })

All standalone functions are convenience wrappers over a shared IconVaultKit instance.

React

Drop-in <Icon /> component, similar to @iconify/react — no icon data to bundle, SVG is fetched on demand and cached in memory.

npm install iconvaultkit react
import { Icon } from "iconvaultkit/react"

<Icon icon="lucide:home" />
<Icon icon="mdi:account-box-outline" width={32} color="#6366f1" />
<Icon icon="tabler:refresh" rotate={180} />

<Icon /> props

| Prop | Type | Default | Description | |---|---|---|---| | icon | string | — | Icon ID, "collection:name" (required) | | width / height | number | 24 | Dimensions in pixels | | size | number | — | Shorthand for setting width and height together | | color | string | "currentColor" | Any CSS color value | | rotate | 90 \| 180 \| 270 | — | Rotate the icon | | hFlip / vFlip / flip | boolean | — | Flip horizontally / vertically / both | | inline | boolean | false | Align like a glyph font instead of a block | | onLoad | () => void | — | Called once the SVG has loaded | | baseUrl | string | Iconify public API | Use your own Iconify-compatible proxy | | className / style | — | — | Passed to the wrapping <span> |

There's also InlineIcon, equivalent to <Icon inline />.

This component ships its own "use client" directive, so it works directly inside Next.js App Router Server Components without you needing to add the directive yourself.

TypeScript

The package ships full TypeScript types including a LibraryPrefix union type that gives autocomplete for all 80+ known library prefixes:

import type { LibraryPrefix, SearchResult, SvgOptions } from "iconvaultkit"

const collection: LibraryPrefix = "lucide" // autocompletes all known prefixes

Supported libraries

80+ libraries including:

Material Design Icons, Lucide, Heroicons, Phosphor, Solar, Tabler, Font Awesome 5/6/7, Bootstrap Icons, Feather, Remix Icon, Ant Design, Radix Icons, Flowbite, Octicons, Carbon, Unicons, Clarity, and more.

Call listCollections() to get the full list with display names.

License

MIT — iconvaultkit.com