A scale transition plugin for Ractive.js
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
README.md
Ractive-transitions-scale.js
bower.json
package.json

README.md

Ractive.js scale transition plugin

Find more Ractive.js plugins at ractivejs.org/plugins

Allows you to scale in / out elements. Optional fade animation transition is turned on by default for fancines and this can be turned off (see usage example below).

Usage

Include this file on your page below Ractive, e.g:

<script src='lib/Ractive.js'></script>
<script src='lib/Ractive-transitions-scale.js'></script>

Or, if you're using a module loader, require this module:

// requiring the plugin will 'activate' it - no need to use the return value
require( 'Ractive-transitions-scale' );

Note: you may need to change the paths where it says require( 'ractive' ) or define([ 'Ractive' ]...).

Example

<div intro="scale:{fade:false, duration:400}">This element will scale on intro</div>
<div intro-outro="scale:{fade:true, duration:400">This element will scale and fade when entering and exiting the DOM</div>

Plugin defaults

{
	duration: 250,
	easing: 'ease-out',
	fade: true,
	from: 0.3,
	to: 1
}

License

Copyright (c) 2013 Ayman Mackouly. Licensed WTFPL