Skip to content

Create fluid and interactive gradient animations with this small javascript library.

License

Notifications You must be signed in to change notification settings

sarcadass/granim.js

Folders and files

NameName
Last commit message
Last commit date
Nov 11, 2018
Sep 13, 2019
Nov 11, 2018
Nov 11, 2018
Nov 11, 2018
Oct 27, 2018
Sep 13, 2019
Sep 13, 2019
Nov 12, 2018
Oct 2, 2016
Aug 31, 2016
Nov 12, 2018
Sep 21, 2016
Nov 11, 2018
Sep 5, 2016
Nov 11, 2018
Apr 4, 2020
Feb 19, 2020
Sep 5, 2016

Repository files navigation

Granim.js Build Status codecov gitter

Create fluid and interactive gradient animations with this small javascript library.

See the demo site.

Install

From NPM

  • Run npm install granim --save

From Bower

  • Run bower install granim

Static

How to use

<!-- Create a <canvas> element -->
<canvas id="granim-canvas"></canvas>

<!-- Call the script -->
<script src="granim.min.js"></script>

<!-- Create a Granim instance -->
<script>
var granimInstance = new Granim({
   element: '#granim-canvas',
   name: 'granim',
   opacity: [1, 1],
   states : {
       "default-state": {
           gradients: [
               ['#834D9B', '#D04ED6'],
               ['#1CD8D2', '#93EDC7']
           ]
       }
   }
});
</script>