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

@mayrlabs/web-icon

v0.3.0

Published

A web icon package for React and Vue

Readme

@mayrlabs/web-icon

A framework-agnostic icon package for React, Vue, and Next.js, supporting Simple Icons, Dev Icons, Local, and Remote icons.

Installation

npm install @mayrlabs/web-icon
# Peer dependencies
npm install react # for React usage
npm install vue # for Vue usage
npm install next # for Next.js usage

Usage

Icon Types & Formats

The icon components and core functions support auto-dispatching based on a prefixed string, or explicit sub-components for specific icon types.

1. Simple Icons (simple:)

Load icons from Simple Icons.

  • Auto-dispatch: icon="simple:github" (or simply icon="github", as it defaults to simple if no prefix is provided).
  • Sub-component: <CustomIcon.simple slug="github" />

2. Dev Icons (dev:)

Load icons from Devicon. You can specify both the icon name and its variant. Valid variants are original, original-wordmark, plain, and plain-wordmark. If the variant is omitted or invalid, it defaults to original.

  • Auto-dispatch: Format is dev:<icon-name>:<variant> or dev:<icon-name>. Example: icon="dev:react", icon="dev:react:original", or icon="dev:github:original-wordmark".
  • Sub-component: <CustomIcon.dev config="react:original" />

3. Local Icons (local:)

Load icons stored locally in your project's public directory.

  • Auto-dispatch: icon="local:/assets/icon.svg" (or icon="local:assets/icon.svg")
  • Sub-component: <CustomIcon.local path="/assets/icon.svg" />

4. Remote Icons (remote:)

Load icons from any absolute external URL.

  • Auto-dispatch: icon="remote:https://example.com/icon.png"
  • Sub-component: <CustomIcon.remote url="https://example.com/icon.png" />

Generator (Root Export)

import { Generator } from "@mayrlabs/web-icon";

const url = Generator.simpleIcon.url("asana");

React

import CustomIcon from "@mayrlabs/web-icon/react";

export function App() {
  return (
    <div className="flex gap-4">
      {/* Auto-dispatch */}
      <CustomIcon icon="simple:asana" size={32} />
      <CustomIcon icon="dev:react:original" size={32} />
      <CustomIcon icon="local:/assets/icon.svg" size={32} />
      <CustomIcon icon="remote:https://example.com/icon.png" size={32} />

      {/* Sub-components via dot-notation */}
      <CustomIcon.simple slug="github" size={32} />
      <CustomIcon.dev config="react:original" size={32} />
      <CustomIcon.local path="/assets/icon.svg" size={32} />
      <CustomIcon.remote url="https://example.com/icon.png" size={32} />
    </div>
  );
}

Next.js

Optimized for Next.js using next/image.

import CustomIcon from "@mayrlabs/web-icon/next";

export function App() {
  return (
    <>
      <CustomIcon icon="simple:asana" size={32} />
      <CustomIcon.simple slug="github" size={32} />
    </>
  );
}

Vue

<script setup>
import CustomIcon from "@mayrlabs/web-icon/vue";
</script>

<template>
  <div class="flex gap-4">
    <CustomIcon icon="simple:asana" :size="32" />
    <CustomIcon.simple slug="github" :size="32" />
  </div>
</template>

Core (Plain HTML)

Returns HTML strings.

import CustomIcon from "@mayrlabs/web-icon/core";

const html1 = CustomIcon({ icon: "simple:asana", size: 32 });
const html2 = CustomIcon.simple({ slug: "github", size: 32 });