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

svelicon

v2.0.2

Published

✨ Svelte Icon Library - Search, discover and download Iconify icons as Svelte components with TypeScript support

Readme

Svelte Icon Library - Svelicon 🎨

Create Svelte components from Iconify SVG icons with type-safe support. A simple CLI tool for generating Svelte icons.

Features ✨

  • 🎯 Iconify Integration: Access and download icons from the Iconify collection.
  • 🔍 Smart Search: Search through thousands of icons with interactive selection.
  • 🚀 Batch Downloads: Download multiple icons at lightning speed with parallel processing.
  • Fast Conversion: Quickly convert SVG icons to Svelte components.
  • 📦 TypeScript Support: Generate fully typed components with interfaces for Svelte TypeScript projects.
  • ⚙️ Auto-Config Validation: Automatically checks and validates tsconfig.json path mappings.
  • 🎨 Customizable Icons: Control icon size, display behavior, and spacing.
  • 🛠️ Advanced CLI: Powerful command-line interface with progress tracking and error handling.
  • 🔄 Flexible Output: Generate JavaScript or TypeScript Svelte components.

Svelicon streamlines the process of using Iconify icons in your Svelte projects, offering TypeScript support and flexible customization.

Requirements 🗒️

  • Svelte 5
  • Awesomeness

Quick Start 🚀

1. Search & Discover

npx svelicon search "home" --collection mdi

2. Interactive Selection

Choose from the search results using numbers, ranges, or "all"

3. Automatic Download

Icons are downloaded with tsconfig validation and progress tracking

4. Use in Your Project

<script>
  import HomeIcon from '$icons/MdiHome.svelte';
</script>

<HomeIcon size={1.5} class="text-blue-500" />

Usage 🚀

🔍 Search Icons

Search through thousands of icons interactively:

# Search for icons
npx svelicon search "arrow"

# Search within a specific collection
npx svelicon search "home" --collection mdi

# Search and browse without downloading
npx svelicon search "user" --no-download

# Advanced search with filters
npx svelicon search "database" --collection lucide --limit 30

📦 Download Icons

Single Icon Download

npx svelicon download "mdi:home"

Batch Download (Super Fast!)

# Download multiple icons at once
npx svelicon download "mdi:home,lucide:star,heroicons:user"

# Batch download with custom concurrency
npx svelicon download "mdi:home,mdi:user,lucide:star" --concurrent 20

Legacy Format (Still Supported)

npx svelicon fluent/person-passkey-28-filled

🛠️ CLI Commands & Options

Search Command

npx svelicon search <query> [options]

Options:
  -c, --collection <name>     Filter by icon collection (e.g., mdi, lucide)
  --category <name>           Filter by category
  -l, --limit <number>        Number of results to show (default: 20)
  -o, --output <dir>          Output directory (default: "src/icons")
  --withts                    Generate TypeScript version (default: true)
  --withjs                    Generate JavaScript version
  --concurrent <number>       Concurrent downloads (default: 10)
  --skip-tsconfig            Skip tsconfig.json validation
  --no-download               Only search, don't download

Download Command

npx svelicon download <icons> [options]

Arguments:
  <icons>                     Icon name or comma-separated list

Options:
  -o, --output <dir>          Output directory (default: "src/icons")
  --withts                    Generate TypeScript version (default: true)
  --withjs                    Generate JavaScript version
  -c, --concurrent <number>   Concurrent downloads for batch (default: 10)
  --skip-tsconfig            Skip tsconfig.json validation

⚙️ TypeScript Configuration

Svelicon automatically validates your tsconfig.json and suggests the optimal configuration:

{
  "compilerOptions": {
    "paths": {
      "$icons": ["src/icons"],
      "$icons/*": ["src/icons/*"]
    }
  }
}

This enables clean imports:

import HomeIcon from '$icons/MdiHome.svelte';

Component Props 🎛️

All generated components accept these props:

interface IconProps {
  size?: number;      // Icon size in em units
  class?: string;     // Add custom CSS classes to the SVG element
}

Examples 📝

🎯 With Path Mapping (Recommended)

<script>
  import HomeIcon from '$icons/MdiHome.svelte';
  import StarIcon from '$icons/LucideStar.svelte';
</script>

<HomeIcon size={1.2} />
<StarIcon class="text-yellow-500" />

TypeScript Usage

<script lang="ts">
  import HomeIcon, { type MdiHomeProps } from '$icons/MdiHome.svelte';
  
  let iconProps: MdiHomeProps = {
    size: 1.2,
    class: 'my-custom-icon'
  };
</script>

<HomeIcon {...iconProps} />

Without Path Mapping

<script>
  import HomeIcon from './icons/MdiHome.svelte';
</script>

<HomeIcon size={1.2} />

Component Output Structure

Generated components include:

<script lang="ts" module>
  export interface MdiHomeProps {
    size?: number;
    class?: string;
  }
</script>

<script lang="ts">
  const { size = 0.7, class: className = '' }: MdiHomeProps = $props();
</script>

<svg
   xmlns="http://www.w3.org/2000/svg"
   width="{size}em"
   height="{size}em"
   viewBox="0 0 24 24"
   class="{className}">
  <!-- optimized SVG path data -->
</svg>

Benefits 🌟

  • 🔍 Smart Discovery: Search through 200,000+ icons with intelligent filtering
  • ⚡ Lightning Fast: Parallel batch downloads with configurable concurrency
  • 🎯 Zero Runtime Dependencies: Svelte icon components are standalone
  • 🌲 Tree-Shakeable: Only import the Svelte icons you use
  • 🔧 Auto-Configuration: Intelligent tsconfig.json validation and suggestions
  • 📦 Type-Safe: Full TypeScript support with generated interfaces
  • 📏 Small Bundle Size: Minimal impact on your Svelte app's size
  • 🎨 Flexible: Use any Iconify icon in your Svelte project
  • 📊 Progress Tracking: Real-time feedback during batch operations
  • 🛡️ Error Resilient: Comprehensive error handling and retry logic

https://youtu.be/6cpXq1MHg-A

Contributing 🤝

Contributions are welcome! Please read our Contributing Guide for details.

License 📄

MIT © Friend of Svelte

Support 💖

If you find this Svelte icon library helpful, please consider:

  • ⭐ Starring the GitHub repo
  • 🐛 Creating issues for bugs and feature requests
  • 🔀 Contributing to the code base

Related Projects 🔗


Made with ❤️ by Friend of Svelte