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 🙏

© 2025 – Pkg Stats / Ryan Hefner

itlab-icons

v1.8.2

Published

Eine flexible und typsichere Icon-Bibliothek für Vue 3, die die offiziellen Icons des IT Lab Hubs bündelt und zusätzlich allgemeine statische und dynamische Icons bereitstellt. Alle Icons sind als Vue-Komponenten verfügbar und können direkt in Templates v

Readme

IT Lab Icons

Eine flexible und typsichere Icon-Bibliothek für Vue 3, die die offiziellen Icons des IT Lab Hubs bündelt und zusätzlich allgemeine statische und dynamische Icons bereitstellt. Alle Icons sind als Vue-Komponenten verfügbar und können direkt in Templates verwendet werden.


NPM version

NPM downloads

NPM updated

Installation

pnpm add itlab-icons

Die Bibliothek ist vollständig tree-shakeable – es werden nur die Icons in das Bundle aufgenommen, die auch tatsächlich importiert werden.

Verwendung

Einfaches Beispiel

<template>
  <PersonIcon />
</template>

<script setup lang="ts">
import { PersonIcon } from 'itlab-icons';
</script>
  • Alle Icons sind standardmäßig SVG-basierte Vue-Komponenten.
  • Props wie class, style, width, oder height können direkt wie bei jeder Vue-Komponente gesetzt werden.

Props-Weitergabe

Da Icons reguläre Komponenten sind, lassen sie sich mit dynamischen Klassen und Styles kombinieren:

<template>
  <PersonIcon class="h-6 w-6 text-gray-600" />
</template>

Icon-Arten

Die Bibliothek unterscheidet zwischen drei Icon-Gruppen:

  • App Icons: Logos der IT Lab Hub Dienste (z. B. AppNewsroomIcon, AppEventsicons).
  • Static Icons: Statische Symbole, ohne Props (z. B. PersonIcon, EllipsisIcon).
  • Dynamic Icons: Symbole, die über Props konfigurierbar sind. Aktuell verfügbar:
    • DocExtensionIcon → rendert dynamisch ein Dokument-Icon basierend auf der extension: string Prop. Darunter wird die Extension als Text angezeigt.

Utilities

createStyledIconRenderer

Eine Utility-Funktion zum Erstellen wiederverwendbarer, gestylter Icon-Renderer.

/**
 * Factory function that creates a Vue render function for an icon with custom styles applied.
 *
 * This function helps separate the creation of a styled icon renderer from the actual rendering process,
 * allowing reusable, configurable icon renderers to be easily composed.
 *
 * @param {Icon} icon - The icon component to be rendered.
 * @param {CSSProperties} style - CSS styles to apply to the icon.
 * @returns {() => VNode<RendererNode, RendererElement, Record<string, any>>} A Vue render function producing the styled icon vnode.
 */
export function createStyledIconRenderer(
  icon: Icon,
  style: CSSProperties,
): () => VNode<RendererNode, RendererElement, { [key: string]: any }> {
  // Return a function that Vue will call to render the icon with the provided styles
  return () => h<Icon>(icon, { style: style });
}

Beispiel

import { createStyledIconRenderer, PersonFillIcon } from 'itlab-icons';

const RedPersonFillIcon = createStyledIconRenderer(PersonFillIcon, { color: 'red' });

createColoredIconRenderer

Eine spezialisierte Version von createStyledIconRenderer, wenn nur die Farbe angepasst werden soll.

/**
 * Factory function that creates a Vue render function for an icon with a specified color.
 *
 * This is a specialized helper built on top of createStyledIconRenderer to quickly produce
 * an icon renderer with only a color style applied.
 *
 * @param {Icon} icon - The icon component to be rendered.
 * @param {string} color - The color to apply to the icon.
 * @returns {() => VNode<RendererNode, RendererElement, Record<string, any>>} A Vue render function producing the colorized icon vnode.
 */
function createColoredIconRenderer(
  icon: Icon,
  color: string,
): () => VNode<RendererNode, RendererElement, { [key: string]: any }>;

Beispiel

import { createStyledIconRenderer, PersonFillIcon } from 'itlab-icons';

const RedPersonFillIcon = createColoredIconRenderer(PersonFillIcon, 'red');

Typen

Icon

Die Bibliothek stellt den Typ Icon bereit, um Icons typsicher als Props oder Parameter zu verwenden.

import { type Icon, PersonIcon } from 'itlab-icons';

const icon: Icon = PersonIcon;

Beispiel

<template>
  <component :is="icon" class="h-6 w-6" />
</template>

<script setup lang="ts">
import type { Icon } from 'itlab-icons';

defineProps<{
  icon: Icon;
}>();
</script>