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

ng-symbols-viewer

v0.1.0

Published

Angular Symbols Viewer - Create a quick view of all the svg symbols available. You can then search or copy auto-generated html code to use them.

Readme

Angular Symbols Viewer

Angular Symbols Viewer helps developers to easily manage their project icons / symbols library. It create quick view of all the svg symbols available on your angular project.

It also comes with a search functionality and auto-generated html code to use these icons / symbols with the selected sizes.

Angular Symbols Viewer is non-intrusive and accessible from any page by clicking on the hidden button that appear when placing the cursor on the bottom right corner of the window.

Install

npm i ng-symbols-viewer

Usage

Import Module

You need to import the NgSymbolsViewerModule in the module of your app where you want to use it (usually AppModule or SharedModule).

Exemple for import in AppModule :

import { BrowserModule } from "@angular/platform-browser";
import { NgModule } from "@angular/core";

import { AppComponent } from "./app.component";
import { NgSymbolsViewerModule } from "ng-symbols-viewer";

@NgModule({
  declarations: [AppComponent],
  imports: [BrowserModule, NgSymbolsViewerModule],
  providers: [],
  bootstrap: [AppComponent],
})
export class AppModule {}

Selector

Basics

Use the <ng-symbols-viewer></ng-symbols-viewer> selector to make the Symbols Viewer available on your project.

CAUTION The <ng-symbols-viewer></ng-symbols-viewer> selector should only be used once in your project. Having multiple selectors at the same time will cause issues.

/!\ IMPORTANT While Angular Symbols Viewer config is optional, it is meant to help developers and therefore only being accessible on a DEV environment.

It is strongly recommended to set a default config with the minimal excludedEnv option.

Exemple :

import { environment } from "src/environments/environment";

myConfig = {
  excludedEnv: environment.production,
};
<ng-symbols-viewer [config]="myConfig"></ng-symbols-viewer>

See more details in the Options section.

Recommendations

I recommend placing the <ng-symbols-viewer></ng-symbols-viewer>

  • either directly inside the app.component.html right after the <router-outlet></router-outlet>
  • or right next to your svg symbols declaration.

Exemple :

<ng-symbols-viewer></ng-symbols-viewer>

<svg style="display: none">

  <symbol id="icon-search" viewBox="0 0 24 24">
    <path fill="currentColor" d="..." />
  </symbol>

  [...]

</svg>

Search & data-labels

Angular Symbols Viewer include a search functionnality that allows you to find icons / symbols by id. You can also add more search keywords / tags to a <symbol> with the data attribute data-labels

Exemple :

<symbol
  id="icon-delete"
  viewBox="0 0 24 24"
  data-labels="remove, trash, erase, cancel"
>
  <path fill="currentColor" d="..." />
</symbol>

CSS & icons sizes

Angular Symbols Viewer comes with some default classes and values for your icons sizes. Add this css code to your project common styles :

[class^="icon-"],
[class~=" icon-"],
.icon {
    display: inline-block;
}

.icon { width: 32px; width: 32px; }
.icon-xs { width: 16px; width: 16px; }
.icon-sm { width: 24px; width: 24px; }
.icon-lg { width: 48px; width: 48px; }
.icon-xl { width: 64px; width: 64px; }

If you don't want to use the default values, you can apply new class prefix or/and new icon sizes in the [config].

Exemple :

Step 1 : Create your custom config

myConfig = {
  classPrefix: 'symbol'
  sizes: [
    {name:'default', size: 24},
    {name:'small', size: 16},
    {name:'big', size: 50},
  ],
};

Step 2 : Create your custom icons styles

[class^="symbol-"],
[class~=" symbol-"],
.symbol {
    display: inline-block;
}

.symbol { width: 24px; width: 24px; }
.symbol-small { width: 16px; width: 16px; }
.symbol-big { width: 50px; width: 50px; }

Step 3 : Profit

<ng-symbols-viewer [config]="myConfig"></ng-symbols-viewer>

Options

Here is the list of all currently available options to be used in the [config]

|Option |Type |Default |Description | |---------|---------|---------|-------------| |classPrefix |string |"icon" |The class prefix that will be used in the auto-generated html code | |excludedEnv |boolean |false |If true, the Angular Symbols Viewer will NOT be accessible. More details here.| |sizes |SymbolsViewerSize[] |defaultSizes |Define the different selectable sizes. |

Environments

Make Angular Symbols Viewer unavailable to Production environment :

import { environment } from "src/environments/environment";

myConfig = {
  excludedEnv: environment.production,
};

Make Angular Symbols Viewer unavailable to multiple environments :

import { environment } from "src/environments/environment";

myConfig = {
  excludedEnv: environment.testing || environment.preprod || environment.production,
};

Config default values

Default sizes

[
  {
    name: 'xs',
    size: 16
  },
  {
    name: 'sm',
    size: 24
  },
  {
    name: 'default',
    size: 32
  },
  {
    name: 'lg',
    size: 48
  },
  {
    name: 'xl',
    size: 64
  },
];