Socket
Book a DemoInstallSign in
Socket

svelte-yafal

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

svelte-yafal

Minimal yet meaningful abstractions for Fontawesome icons in Svelte.

0.1.2
latest
npmnpm
Version published
Weekly downloads
5
400%
Maintainers
1
Weekly downloads
 
Created
Source

svelte-yafal (Yet another font awesome library)

Minimal yet meaningful abstractions for Fontawesome icons in Svelte.

REPL

Features

  • Normalized dimensions
  • Animations
  • Easy to combine icons
  • Low overhead, based on the tree-shakeable @fortawesome/ packages

Installation

npm i svelte-yafal -D

Usage

Basics

<script>
	import { FaSvg, Icon } from 'svelte-yafal';
	import { faFlag } from '@fortawesome/free-solid-svg-icons';
</script>

<FaSvg><Icon icon="{faFlag}" size="{3}" /></FaSvg>

Animations

<FaSvg beat>
	<Icon icon="{faHeart}" />
</FaSvg>

Transformations

<FaSvg>
	<Icon
		icon="{faFlag}"
		translateX="{256}"
		translateY="{128}"
		scale="{0.25}"
		rotate="{90}"
		flipX
		flipY
	/>
</FaSvg>

Layers

<FaSvg>
	<Icon icon="{faCalendar}" />
	<Icon icon="{faSun}" scale="{0.2}" />
	<text x="100" y="450" font-size="250">23</text>
</FaSvg>

The units used for positioning will be in the frame of reference of the SVG. x=0 would start the text from the left edge, whereas 512 would push it beyond the right edge.

Contributions

Feature requests and PRs are welcome. New features will only be added upon request so as to not bloat things.

Keywords

svelte

FAQs

Package last updated on 29 Sep 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.