Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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

How to install free icons from Fontawesome in Vue3.
https://github.com/atomjoy/vue-fontawesome

List: vue-fontawesome

fontawesome-vue vue-fontawesome vue-icons vue3-fontawesome vue3-icons

Last synced: about 2 months ago
JSON representation

How to install free icons from Fontawesome in Vue3.

Awesome Lists containing this project

README

        

# Vue3 Fontawesome Icons
How to install free icons from fontawesome in vue3.

## Vue 3

```sh
npm install vue@latest
npm install vue-router@4
npm install vue-i18n@9
npm install pinia
npm install --save-dev @vitejs/plugin-vue
npm install @googlemaps/js-api-loader
```

## Fontawesome

### Install
```sh
npm i --save @fortawesome/vue-fontawesome@latest-3
npm i --save @fortawesome/fontawesome-svg-core
npm i --save @fortawesome/free-solid-svg-icons
npm i --save @fortawesome/free-regular-svg-icons
npm i --save @fortawesome/free-brands-svg-icons
```

### Add in app.js

```js
import './bootstrap';
import { createApp } from 'vue'
import App from './App.vue'
import './assets/main.css'
import FontAwesomeIcon from "./utils/fontawesome";

const app = createApp(App)
app.component("FontAwesomeIcon", FontAwesomeIcon)
app.mount('#app')
```

### Add icon

```vue
// import { FontAwesomeIcon } from "@fortawesome/vue-fontawesome";

function scrollToTop() {
window.scrollTo({top: 0, behavior: 'smooth'});
// window.scrollIntoView({ behavior: 'smooth' })
// window.scrollTo(0,0);
}


html {
scroll-behavior: smooth;
}

.scrolltop {
color: #fff;
background: #0099ff;
position: fixed;
bottom: 10px;
right: 10px;
padding: 15px;
}

```

### More icons

```vue






```