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

relaxicons

v1.1.1

Published

Relaxicons CLI: fetch Iconify icons and instantly generate themed React, Vue, Angular, and Laravel components with auto barrel exports and SVG normalization.

Readme

Relaxicons

Fetch any Iconify icon and generate ready-to-use components for React, Vue, Angular, Laravel, Svelte, Solid, Web Components, and Next.js RSC-safe React.

npm version Docs License Node

Features

  • Fetch icons by collection:name
  • Fuzzy suggestions if an icon name is off by a few characters
  • Transform SVG for theming (remove width/height, apply currentColor)
  • Multi-framework templates (React, Vue, Angular, Laravel Blade, Svelte, Solid, Web Components, Next RSC)
  • Raw SVG output option
  • Autodetects your framework (Next, Vite React/Vue, Angular, Laravel)
  • Barrel export auto-maintenance (alphabetically sorted)
  • Pretty formatting via Prettier
  • Optional SVGO optimization
  • Icon Explorer: Favorites & Recent tabs, keyboard shortcuts (arrows + Enter), export selection, copy variants (CMD/SVG/DATA), per-collection stats and a top-icons carousel
  • CLI additions: stats, cache-clear, improved doctor

Documentation

Full docs & guides: https://ravikisha.github.io/relaxicons

Install

npm install -g relaxicons

Install framework runtime (choose what you use):

# React / Next.js
npm i react react-dom
npm i next   # optional if using Next.js

# Vue
npm i vue

# Angular
npm i @angular/core

# Svelte
npm i svelte

# Solid
npm i solid-js

# Web Components
# no additional runtime required

Check version:

relaxicons --version

Quick Start

relaxicons init           # detects framework & creates relaxicons.config.json
relaxicons add lucide:home # generates HomeIcon component

Configuration (relaxicons.config.json)

{
  "framework": "react",      // react | next | next-rsc | vue | angular | laravel | svelte | solid | webc | unknown
  "iconPath": "src/components/icons",
  "typescript": true,         // enable TS output where applicable
  "templatesDir": "./relaxicons-templates", // optional custom templates
  "optimizeSvg": true,
  "generatedAt": "2025-11-25T00:00:00.000Z"
}

Regenerate with --force:

relaxicons init --force

Validation: a JSON Schema (relaxicons.config.schema.json) is included; migrate older configs with relaxicons migrate-config.

Commands

| Command | Description | |---------|-------------| | relaxicons init | Create config interactively | | relaxicons add <collection:name> | Fetch & generate component | | relaxicons collections | List available collection prefixes | | relaxicons icons <collection> | List icon names from collection | | relaxicons search <query> | Search icons across collections (use --collection to scope) | | relaxicons remove <collection:name> | Remove generated icon and update barrel | | relaxicons doctor | Validate environment and config | | relaxicons update-cache | Refresh local cache (collections and icons) | | relaxicons list <collection> | Deprecated alias for icons | | relaxicons migrate-config | Update config to latest schema | | relaxicons regenerate -m <manifest> | CI helper to regenerate icons |

Options

| Flag | Purpose | |------|---------| | --framework <fw> | Override configured framework for single add | | --raw | Output optimized SVG file only | | --both | Generate both component and cleaned SVG side-by-side | | --force | Overwrite existing file or config | | --filter <text> | Filter items when listing/searching | | --limit <n> | Limit number printed (default 50) | | --json | JSON output (collections/icons) | | --fields <list> | For collections: choose fields (name,title,count) | | --from <file> | Add icons from a file (newline or comma separated) | | --no-svgo | Disable SVGO optimization | | --quiet | Suppress non-essential output | | --no-color | Disable colored output | | --dry-run | Print actions without writing files |

Examples

relaxicons add lucide:alarm-clock
relaxicons add lucide:alarm-clock --framework vue
relaxicons add lucide:alarm-clock --framework svelte
relaxicons add lucide:alarm-clock --framework solid
relaxicons add lucide:alarm-clock --framework webc
relaxicons add lucide:alarm-clock --framework next-rsc
relaxicons add lucide:alarm-clock --raw
relaxicons add lucide:alarm-clock --both
relaxicons icons lucide --filter clock
relaxicons icons lucide --json --limit 10
relaxicons collections --filter luc
relaxicons collections --fields name,title,count --json
relaxicons update-cache
relaxicons search arrow --collection lucide
relaxicons add lucide:home,star,bell
relaxicons add --from icons.txt
relaxicons remove lucide:home
relaxicons doctor
relaxicons stats -c lucide --json
relaxicons search arrow --json --limit 50
relaxicons cache-clear

Suggestions

If an icon isn't found you get a hint:

Icon not found
Did you mean: alarm-clock, alarm-check, alarm-off?

Generated Files

React example:

export function HomeIcon(props) {
  return (
    <svg viewBox="0 0 24 24" {...props}>
      <path d="..." />
    </svg>
  );
}

Barrel export auto-appends:

export * from './HomeIcon';

Exports are kept sorted alphabetically.

Raw Mode

relaxicons add lucide:home --raw # writes home.svg

Angular Example

@Component({
  selector: 'icon-home',
  standalone: true,
  template: `<svg viewBox="0 0 24 24"><path d="..."/></svg>`
})
export class HomeIcon {}

Laravel Blade Example

<?php /* HomeIcon */ ?>
<svg viewBox="0 0 24 24" {{ $attributes }}>
  <path d="..." />
</svg>

Troubleshooting

| Issue | Fix | |-------|-----| | relaxicons.config.json not found | Run relaxicons init first | | Duplicate file warning | Use --force to overwrite | | Invalid icon id format | Use collection:name like lucide:home | | Network errors | Verify collection/icon exists on Iconify | | Rate limits | CLI retries and falls back to cache | | Stale data | Run relaxicons update-cache or clear ~/.cache/relaxicons | | Offline | Set RELAXICONS_OFFLINE=1 (requires warm cache) |

Development

See DEV_GUIDE.md for architecture & contributing. Run tests:

npm test
npm run coverage

CI Automation

Use the regenerate command in CI with a manifest of icon IDs:

relaxicons regenerate -m relaxicons.manifest

An example GitHub Action is provided in .github/workflows/relaxicons-regenerate.yml.

Deprecations

list is deprecated and will be removed in v2.0. Use icons <collection> instead.

License

ISC © 2025 Relaxicons Contributors