Introduces easily integratable animations for your elemental blocks
- silverstripe/framework ^4.4 || ^5
- silverstripe/elemental ^4 || ^5
This module was only tested on >= 4.10.
composer require wakeworks/elemental-animator
Then dev/build?flush=1.
To introduce animations into your elements, you'll have to which animation you want to each element.
<div
data-scroll
data-animated="fadeIn">
$HTML
</div>
There are multiple options available
<div
data-scroll
data-animated="fadeIn"
data-animated-delay="100"
data-animated-duration="100">
$HTML
</div>
Option | Description | Default |
---|---|---|
data-animated | Which effect will be used | none |
data-animated-delay | Delay in ms after which the effect will start | 0 |
data-animated-duration | Duration in ms that the animation will take | 1000 |
- fadeIn
- fadeInUp
- fadeInDown
- fadeInLeft
- fadeInRight
You can control your animations in cms by enabling the animations for all elements or specific ones. This will add input fields to your element's settings tab.
# Enable for all
DNADesign\Elemental\Models\BaseElement:
animated: true
# Enable for specific one
Your\Specific\Element:
animated: true
<div
data-scroll
data-animated="$Animation"
data-animated-delay="$AnimationDelay"
data-animated-duration="$AnimationDuration">
$HTML
</div>