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

denji

v1.0.0

Published

A CLI tool to manage your SVG icons

Readme

Denji

CLI tool for managing SVG icons in frontend projects. Fetches icons from Iconify, converts to optimized components, and maintains a centralized icons file.

Supports React, Preact, Solid, and Vue.

Documentation

Visit https://denji-docs.vercel.app/docs to view the full documentation.

Installation

npm add -D denji

Quick Start

# Initialize config
denji init

# Add icons
denji add lucide:check mdi:home

# List icons
denji list

# Remove icons
denji remove Check Home

# Clear all icons
denji clear

Configuration

Create denji.json:

{
  "$schema": "./node_modules/denji/configuration_schema.json",
  "output": "./src/icons.tsx",
  "framework": "react",
  "typescript": true,
  "a11y": "hidden",
  "hooks": {
    "postAdd": ["npx biome check --write ./src/icons.tsx"]
  }
}

Options

| Option | Type | Default | Description | |--------|------|---------|-------------| | output | string | - | Output file path (e.g., ./src/icons.tsx) | | framework | "react" | "preact" | "solid" | "vue" | - | Target framework | | typescript | boolean | true | Generate TypeScript | | a11y | "hidden" | "img" | "title" | "presentation" | false | - | SVG accessibility strategy | | hooks | object | - | Lifecycle hooks |

Frameworks

React

denji init --framework react
{
  "framework": "react",
  "react": {
    "forwardRef": true
  }
}

Usage:

import { Icons } from "./icons";

function App() {
  return <Icons.Check className="size-4 text-green-500" />;
}

Options:

| Option | Type | Default | Description | |--------|------|---------|-------------| | react.forwardRef | boolean | false | Wrap icons with forwardRef |

Preact

denji init --framework preact
{
  "framework": "preact",
  "preact": {
    "forwardRef": true
  }
}

Usage:

import { Icons } from "./icons";

function App() {
  return <Icons.Check className="size-4 text-green-500" />;
}

Options:

| Option | Type | Default | Description | |--------|------|---------|-------------| | preact.forwardRef | boolean | false | Wrap icons with forwardRef (uses preact/compat) |

Solid

denji init --framework solid
{
  "framework": "solid"
}

Usage:

import { Icons } from "./icons";

function App() {
  return <Icons.Check class="size-4 text-green-500" />;
}

Note: Solid uses class instead of className. Refs are passed as regular props - no forwardRef needed.

Vue

denji init --framework vue
{
  "framework": "vue"
}

Usage:

<script setup lang="ts">
import { Icons } from "./icons";
</script>

<template>
  <Icons.Check class="size-4 text-green-500" />
</template>

Note: Vue icons use h() render functions as FunctionalComponent types. Uses class instead of className.

Accessibility

| Strategy | Description | |----------|-------------| | hidden | Adds aria-hidden="true" (decorative icons) | | img | Adds role="img" with aria-label | | title | Adds <title> element inside SVG | | presentation | Adds role="presentation" | | false | No accessibility attributes |

Hooks

Available hooks: preAdd, postAdd, preRemove, postRemove, preClear, postClear, preList, postList

Commands

denji init

Initialize a new project with config file and icons template.

denji init [--output <file>] [--framework <framework>] [--typescript] [--a11y <strategy>]

denji add <icons...>

Add icons from Iconify. Uses prefix:name format.

denji add lucide:check mdi:home-outline
denji add lucide:star --name FavoriteStar
denji add lucide:check --a11y img

denji remove <icons...>

Remove icons by component name.

denji remove Check Home

denji list

List all icons in the project.

denji list
denji list --json

denji clear

Remove all icons.

denji clear
denji clear --yes  # Skip confirmation

License

MIT