Skip to content

1N50MN14/Ractive-transitions-scale

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 

Repository files navigation

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

About

A scale transition plugin for Ractive.js

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published