Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

unplugin-icons

Package Overview
Dependencies
Maintainers
4
Versions
90
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

unplugin-icons

Access thousands of icons as components on-demand universally

  • 0.19.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
125K
decreased by-0.6%
Maintainers
4
Weekly downloads
 
Created

What is unplugin-icons?

unplugin-icons is an npm package that provides a convenient way to use icons from various icon sets in your projects. It supports multiple frameworks like Vue, React, and Svelte, and allows you to import icons on-demand, reducing the bundle size.

What are unplugin-icons's main functionalities?

On-Demand Icon Import

This feature allows you to import only the icons you need, which helps in reducing the bundle size. The code sample demonstrates how to import and use a specific icon from the 'bi' (Boxicons) set in a React component.

import { Icon } from 'unplugin-icons';
import { BiAlarm } from 'unplugin-icons/bi';

const MyComponent = () => (
  <div>
    <Icon icon={BiAlarm} />
  </div>
);

Framework Support

unplugin-icons supports multiple frameworks like Vue, React, and Svelte. The code sample shows how to use an icon in a Vue component.

import { defineComponent } from 'vue';
import { BiAlarm } from 'unplugin-icons/bi';

export default defineComponent({
  components: { BiAlarm },
  template: '<BiAlarm />'
});

Custom Icon Sets

You can also use custom icon sets with unplugin-icons. The code sample demonstrates how to import and use a custom icon in a React component.

import { Icon } from 'unplugin-icons';
import { MyCustomIcon } from './my-custom-icons';

const MyComponent = () => (
  <div>
    <Icon icon={MyCustomIcon} />
  </div>
);

Other packages similar to unplugin-icons

FAQs

Package last updated on 01 May 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc