Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/altipla-consulting/fa5-icon
Vue 3 component to insert Font Awesome 5 icons.
https://github.com/altipla-consulting/fa5-icon
Last synced: about 1 month ago
JSON representation
Vue 3 component to insert Font Awesome 5 icons.
- Host: GitHub
- URL: https://github.com/altipla-consulting/fa5-icon
- Owner: altipla-consulting
- License: mit
- Created: 2021-08-14T23:56:45.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2022-04-18T11:48:55.000Z (over 2 years ago)
- Last Synced: 2024-04-16T00:19:35.224Z (9 months ago)
- Language: Vue
- Homepage: https://www.npmjs.com/package/@altipla/fa5-icon
- Size: 76.2 KB
- Stars: 0
- Watchers: 6
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# fa5-icon
Vue 3 component to insert Font Awesome 5 icons.
## Install
```sh
npm i @altipla/fa5-icon
```## Usage
Declare the `ac-icon` component in the main script of the app:
```js
import { createApp } from 'vue'
import { Icon } from '@altipla/fa5-icon'import './icons'
let app = createApp(...) // your initialization
app.component(Icon.name, Icon)
app.mount(...) // your initialization
```Icons are declared in a different file to make it easier to add or remove icons from the available list. Declare any icon you need there:
```js
import { library } from '@fortawesome/fontawesome-svg-core'
import {
faTrash as faTrashSolid,
} from '@fortawesome/free-solid-svg-icons'library.add(
faTrashSolid,
)
```Finally use the component as needed inside your app:
```vue
trash
spinner-thirdexport default {
}```
## Supported icons
There are multiple NPM libraries available from the `@fortawesome` organization if you have the Pro version. All of them are supported in this package.
|NPM package|
|-----------|
|`@fortawesome/free-solid-svg-icons`|
|`@fortawesome/pro-solid-svg-icons`|
|`@fortawesome/pro-regular-svg-icons`|
|`@fortawesome/pro-light-svg-icons`|
|`@fortawesome/pro-duotone-svg-icons`|
|`@fortawesome/pro-brands-svg-icons`|