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

@canonical/svelte-icons

v0.0.9

Published

Canonical's icons as Svelte components

Readme

@canonical/svelte-icons

Canonical's design system icons packaged as Svelte 5 components. This library provides all icons from Canonical's Pragma design system as easy-to-use Svelte components.

[!WARNING] This package is it's experimental stage. It may undergo significant changes before reaching a stable release. It is not recommended for production use at this time.

Installation

bun add @canonical/svelte-icons

Usage

Basic Usage

Import icons individually and use them as components:

<script>
  import { HomeIcon, SettingsIcon, UserIcon } from "@canonical/svelte-icons";
</script>

<HomeIcon />
<SettingsIcon class="custom-class" />
<UserIcon />

Styling Icons

Icons by default inherit the current text color and size.

<script>
  import { SearchIcon } from "@canonical/svelte-icons";
</script>

<SearchIcon style="color: red; width: 2em; height: 2em;" />

Performance Optimization

When using the same icon multiple times, you may use IconsOptimizationProvider to deduplicate SVG definitions in the generated markup:

<script>
  import { IconsOptimizationProvider, HomeIcon } from "@canonical/svelte-icons";
</script>

<IconsOptimizationProvider>
  <nav>
    <HomeIcon />
    <!-- All instances share the same SVG definition -->
    <HomeIcon />
    <HomeIcon />
  </nav>
</IconsOptimizationProvider>

This is especially useful when rendering the same icon many times.

Check out the Node tree size comparison story to see the DOM size difference between optimized and non-optimized rendering.

Custom Icons

You can also create custom icon components using the IconBase component:

<script>
  import { IconBase } from "@canonical/svelte-icons";
</script>

<IconBase iconName="my-custom-icon">
  <svg viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
    <circle cx="8" cy="8" r="6" stroke="black" stroke-width="1" fill="red" />
  </svg>
</IconBase>

[!IMPORTANT] When using custom icons with IconsOptimizationProvider:

  • ensure that the iconName prop is unique for each custom icon to avoid collisions,
  • modifying the SVG content inside IconBase during runtime may lead to unexpected behaviors.

Check out the Reactivity playground story to learn more.

Icon Source

All SVG icons are sourced from the @canonical/ds-assets package, which is part of Canonical's Pragma design system.

Development

# Install dependencies
bun install

# Build icon components from source
bun run build

# Run Storybook for development
bun run storybook

# Type check
bun run check