1.0.0 • Published 5 years ago
@nuxtclub/feathericons v1.0.0
@nuxtclub/feathericons
Setup
- Add
@nuxtclub/feathericonsdependency to your project
npm i -D @nuxtclub/feathericons- Add
@nuxtclub/feathericonsto thebuildModulessection ofnuxt.config.js
:warning: If you are using Nuxt < v2.9 you have to install the module as a dependency (No --dev or --save-dev flags) and use modules section in nuxt.config.js instead of buildModules.
export default {
buildModules: ['@nuxtclub/feathericons'],
}Typescript support
Add the types to your "types" array in tsconfig.json after the @nuxt/types entry.
:warning: Use @nuxt/vue-app instead of @nuxt/types for nuxt < 2.9.
{
"compilerOptions": {
"types": ["@nuxt/types", "@nuxtclub/feathericons"]
}
}Usage
This module will inject \$feathericons in the context of your application.
Using \$feathericons you can access to an object with all the icons of the Feather Icons Package.
Example
<template>
<div v-html="$feathericons['home'].toSvg()"></div>
</template>Learn more about Feather Icons here.
1.0.0
5 years ago