Simple animations using FontAwesome and some CSS3.
Go to file
Louis LIN f3ebc50fdd
Merge pull request #41 from l-lin/dependabot/npm_and_yarn/glob-parent-5.1.2
build(deps): bump glob-parent from 5.1.1 to 5.1.2
2021-06-12 22:03:00 +02:00
.github/workflows build: remove publishing to Github package 2021-01-22 10:28:51 +01:00
css 1.1.1 2021-01-24 12:32:01 +01:00
scripts feat: split animations into multiple files + improve README.md with examples 2021-01-23 14:07:47 +01:00
scss feat(#33): add faa-reverse + use SCSS variable for speed 2021-01-24 12:20:08 +01:00
_config.yml Set theme jekyll-theme-midnight 2021-01-22 21:21:40 +01:00
.editorconfig build: change CI 2021-01-21 20:25:02 +01:00
.gitignore build: add release workflow 2021-01-22 10:02:23 +01:00
font-awesome-animation.scss feat(#33): add faa-reverse + use SCSS variable for speed 2021-01-24 12:20:08 +01:00
LICENSE doc: update LICENSE dates 2021-01-21 12:42:49 +01:00
package-lock.json build(deps): bump glob-parent from 5.1.1 to 5.1.2 2021-06-12 15:53:05 +00:00
package.json build(deps-dev): bump postcss from 8.2.4 to 8.2.10 2021-05-12 00:17:56 +00:00
README.md doc: use latest version of font-awesome-animation version from CDN 2021-01-24 12:40:18 +01:00

font-awesome-animation

Simple animations using some CSS3 I found on the web. Best used on glyphicons like FontAwesome

build npm npm jsdelivr

Getting started

Install from NPM:

npm install font-awesome-animation

Or with a CDN:

https://www.jsdelivr.com/package/npm/font-awesome-animation

Include CSS file in your index.html file:

<link rel="stylesheet" href="font-awesome-animation.min.css">

Usage

On DOM load

Add the desired CSS class faa-xxx along with animated to the icon (or any element of your DOM):

<i class="fa fa-wrench faa-wrench animated"></i>

On hover

Instead of using animated, use the animated-hover CSS class:

<i class="fa fa-wrench faa-wrench animated-hover"></i>

On parent element hover

For parent hover, add the CSS class faa-parent and animated-hover on the parent element:

<a href="#" class="faa-parent animated-hover">
  <i class="fa fa-wrench faa-wrench" style="font-size: 3em;"></i>&nbsp;hover mouse here
</a>
 hover mouse here

Animation speed

You can regulate the speed of the animation by adding the CSS class faa-fast or faa-slow:

<i class="fa fa-wrench faa-wrench animated faa-fast"></i>
<i class="fa fa-wrench faa-wrench animated faa-slow"></i>

 fast   slow

Animation list

Check the Github page to view the previews.

Animation Preview Fast Slow
faa-wrench
faa-ring
faa-horizontal
faa-horizontal faa-reverse
faa-vertical
faa-flash
faa-bounce
faa-bounce faa-reverse
faa-spin
faa-spin faa-reverse
faa-float
faa-pulse
faa-shake
faa-tada
faa-passing
faa-passing faa-reverse
faa-burst
faa-falling
faa-falling faa-reverse
faa-rising

Development

Build

# install dependencies
npm install

# generate prefixes and minified CSS files
npm run build

Local preview

To test in local, you can use:

Release

# this will create a new version and push to remote repository
npm version [<newversion> | major | minor | patch]

Then go to the release page and manually create a new release. There is an automatic Github action that publishes automatically to NPM repository.

License

MIT License