https://github.com/FortAwesome/vue-fontawesome

 

FortAwesome/vue-fontawesome

Font Awesome 5 Vue component. Contribute to FortAwesome/vue-fontawesome development by creating an account on GitHub.

github.com

위 링크를 참조하였음

 

NPM 으로 설치

$ npm i --save @fortawesome/fontawesome-svg-core
$ npm i --save @fortawesome/free-solid-svg-icons
$ npm i --save @fortawesome/vue-fontawesome

vue /src/main.js 에서 설정

import { library as faLibrary } from '@fortawesome/fontawesome-svg-core'
import { faHome, faSearch, faPlus } from '@fortawesome/free-solid-svg-icons'
import { FontAwesomeIcon } from '@fortawesome/vue-fontawesome'

// Set up FontAwesome
faLibrary.add(faHome, faSearch, faPlus)
Vue.component('font-awesome-icon', FontAwesomeIcon)

화면에서 사용

<font-awesome-icon icon="plus" />

+ Recent posts