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

@ducdev2k1/vue-material-icons

v1.0.97

Published

A lightweight Vue 3 icon library with 2000+ Material Icons rendered as inline SVG components. Includes full TypeScript support, auto-import capability, and optimized tree-shaking for fast and scalable development.

Readme

Vue Material Icons


English

A lightweight Vue 3 icon library with 2000+ Material Icons rendered as inline SVG components. Includes full TypeScript support, auto-import capability, and optimized tree-shaking for fast and scalable development.


✨ Features

  • 2000+ Material Icons as Vue 3 components (SVG-based)
  • Tree-shakable & optimized for performance
  • Auto-import support with unplugin-vue-components
  • Full TypeScript support
  • Customizable via props (size, color, class, etc.)
  • Works great with Vite, Nuxt 3, Vue CLI

📦 Installation

npm i @ducdev2k1/vue-material-icons
# or
yarn add @ducdev2k1/vue-material-icons

🚀 Usage

Create file component "MaterialIcon"

<script setup lang="ts">
import * as MIcons from '@ducdev2k1/vue-material-icons';
import { computed, defineProps } from 'vue';

type IconName = keyof typeof MIcons;

interface IProps {
  icon: IconName;
  size?: string | number;
  color?: string;
  viewBox?: string;
}

const props = defineProps<IProps>();
const icon = computed(() => MIcons[props.icon]);
</script>

<template>
  <component :is="icon" :size="props.size" :color="props.color" :viewBox="props.viewBox" />
</template>
<MaterinalIcon icon="HomeIcon" />

Global Registration

// main.ts
import { createApp } from 'vue';
import App from './App.vue';
import MaterialIcons from '@ducdev2k1/vue-material-icons';

const app = createApp(App);
app.use(MaterialIcons);
app.mount('#app');

Local Import

import { HomeIcon, AddIcon } from '@ducdev2k1/vue-material-icons';

export default {
  components: {
    HomeIcon,
    AddIcon,
  },
};

Auto Import (with unplugin-vue-components)

// vite.config.ts
import Components from 'unplugin-vue-components/vite';

export default {
  plugins: [
    Components({
      resolvers: [
        (name) => {
          if (name.endsWith('Icon')) {
            return {
              importName: name,
              path: '@ducdev2k1/vue-material-icons',
            };
          }
        },
      ],
    }),
  ],
};

🧩 Props

| Prop | Type | Description | Default | |-------|--------|----------------------------------|-----------| | size | string | Icon size (e.g. 24px, 1rem) | 24px | | color | string | Icon color | inherit | | class | string | Custom CSS or Tailwind classes | — |

<AddIcon size="32px" color="red" class="ml-2" />

📁 Icon List

All icons follow PascalCase + Icon suffix naming convention.

| Material Name | Component Name | |----------------------|-----------------------| | home | HomeIcon | | search | SearchIcon | | add_circle_outline | AddCircleOutlineIcon|

Browse icons at: https://fonts.google.com/icons


📄 License

MIT © DucDev


🇻🇳 Tiếng Việt

Thư viện biểu tượng nhẹ dành cho Vue 3, với hơn 2000+ Material Icons được hiển thị dưới dạng component SVG. Hỗ trợ đầy đủ TypeScript, auto-import và tối ưu tree-shaking để phát triển nhanh chóng, hiệu quả và linh hoạt.


✨ Tính năng nổi bật

  • Hơn 2000+ biểu tượng Material dưới dạng component Vue (dựa trên SVG)
  • Tối ưu hiệu suất với khả năng tree-shaking
  • Hỗ trợ auto-import qua unplugin-vue-components
  • Tích hợp đầy đủ TypeScript
  • Tuỳ chỉnh dễ dàng qua props (kích thước, màu sắc, class,...)
  • Hoạt động tốt với Vite, Nuxt 3, Vue CLI

📦 Cài đặt

npm i @ducdev2k1/vue-material-icons
# hoặc
yarn add @ducdev2k1/vue-material-icons

🚀 Cách sử dụng

Tạo file component "MaterialIcon"

<script setup lang="ts">
import * as MIcons from '@ducdev2k1/vue-material-icons';
import { computed, defineProps } from 'vue';

type IconName = keyof typeof MIcons;

interface IProps {
  icon: IconName;
  size?: string | number;
  color?: string;
  viewBox?: string;
}

const props = defineProps<IProps>();
const icon = computed(() => MIcons[props.icon]);
</script>

<template>
  <component :is="icon" :size="props.size" :color="props.color" :viewBox="props.viewBox" />
</template>
<MaterinalIcon icon="HomeIcon" />

Đăng ký toàn cục

// main.ts
import { createApp } from 'vue';
import App from './App.vue';
import MaterialIcons from '@ducdev2k1/vue-material-icons';

const app = createApp(App);
app.use(MaterialIcons);
app.mount('#app');

Import từng icon

import { HomeIcon, AddIcon } from '@ducdev2k1/vue-material-icons';

export default {
  components: {
    HomeIcon,
    AddIcon,
  },
};

Tự động import với unplugin-vue-components

// vite.config.ts
import Components from 'unplugin-vue-components/vite';

export default {
  plugins: [
    Components({
      resolvers: [
        (name) => {
          if (name.endsWith('Icon')) {
            return {
              importName: name,
              path: '@ducdev2k1/vue-material-icons',
            };
          }
        },
      ],
    }),
  ],
};

🧩 Thuộc tính (props)

| Prop | Kiểu | Mô tả | Mặc định | |-------|-----------|----------------------------------|-----------| | size | string | Kích thước icon (vd: 24px) | 24px | | color | string | Màu biểu tượng (vd: #000, red)| inherit | | class | string | Class CSS tùy chỉnh | — |

<AddIcon size="32px" color="red" class="ml-2" />

📁 Danh sách biểu tượng

Tất cả biểu tượng được đặt tên theo quy tắc PascalCase và hậu tố Icon.

| Tên gốc Material | Tên component Vue | |------------------------|-------------------------| | home | HomeIcon | | search | SearchIcon | | add_circle_outline | AddCircleOutlineIcon |

Xem danh sách icon tại: https://fonts.google.com/icons

📄 Giấy phép

MIT © DucDev