Vue Feather Icons Component

2.0.0 · active · verified Sun Apr 19

Vue Feather is a component library providing easy integration of Feather icons into Vue 3 applications. The current stable version is `2.0.0`, which marks a significant upgrade to support Vue 3, diverging from previous versions compatible with Vue 2. The library follows Semantic Versioning guidelines, indicating predictable updates. Key differentiators include its lightweight nature, use of functional components for enhanced performance, and extensive customization options via props such as `animation`, `size`, `stroke`, and `type`. It functions as a wrapper around the `feather-icons` library, which must be installed separately as a peer dependency, providing the underlying SVG assets. Releases are infrequent but align with major Vue and Feather Icons updates, focusing on stability and compatibility.

Common errors

Warnings

Install

Imports

Quickstart

Demonstrates how to install `vue-feather` and register it globally in a Vue 3 application, then use multiple Feather icons in a component template with various props.

import { createApp } from 'vue';
import VueFeather from 'vue-feather';

const app = createApp({
  template: `
    <div>
      <h1>Feather Icons Example</h1>
      <vue-feather type="feather" animation="pulse" size="36"></vue-feather>
      <vue-feather type="activity" stroke="red" stroke-width="3"></vue-feather>
      <vue-feather type="camera" fill="blue" size="48"></vue-feather>
    </div>
  `
});

// Register the component globally
app.component(VueFeather.name, VueFeather);

app.mount('#app');

// To run this, you'd typically have an index.html with <div id="app"></div>
// and script type="module" src="main.js" (assuming this file is main.js).

view raw JSON →