@dimfeld/svelte-awesome
v2.3.1
Published
Font Awesome component for Svelte JS, using inline SVG
Downloads
39
Maintainers
Readme
Svelte-Awesome
Awesome SVG icon component for Svelte JS, built with Font Awesome icons. Based on Justineo/vue-awesome
Svelte-Awesome supports Font-Awesome v4.7.0
(icons inbuilt) and v5
(via @fortawesome
npm packages)
A demo is available here
Installation
NPM
$ npm install --save svelte-awesome
Usage
<!-- basic -->
<Icon data={beer}></Icon>
<!-- with options -->
<Icon data={refresh} scale="2"></Icon>
<Icon data={comment} flip="horizontal"></Icon>
<Icon data={codeFork} label="Forked Repository"></Icon>
<!-- stacked icons [WIP] -->
<Icon label="No Photos">
<Icon data={camera}></Icon>
<Icon name={ban} scale="2" class="alert"></Icon>
</Icon>
<!-- FontAwesome v5 Icons!! -->
<Icon data={faThumbsUp}></Icon>
<script>
import { beer, refresh, comment, codeFork, camera, ban } from 'svelte-awesome/icons';
import { faThumbsUp } from '@fortawesome/free-regular-svg-icons';
</script>