Reveal
Animate components when they enters the viewport
Last updated
Animate components when they enters the viewport
Last updated
We are Realmac Software. We make nice things.
The “Reveal” animation component in Elements allows you to add visually engaging animations to your website. As elements come into view, they can “reveal” themselves with smooth, dynamic effects.
By using the data-reveal-*
attributes in your Custom Components, you can take advantage of the Animation framework built into Elements.
As a minimum you can add data-reveal
to any DOM element to apply a default animation as the element enters the viewport. If you would like to customise the animation, the following data attributes are available.
data-reveal
String | null
Does not require a value.
data-reveal-scrub
Boolean
Enable scrubbing.
data-reveal-animation
String
data-reveal-exit-animation
String
data-reveal-distance
CSS Value
200px, 75%, 33vh.
data-reveal-degrees
Number
90, -45, 312.
data-reveal-play
String
data-reveal-start
String
data-reveal-end
String
data-reveal-easing
String
data-reveal-duration
Number
In seconds
data-reveal-delay
Number
In seconds
data-reveal-id
String
Optional ID, used to identify debug markers.
data-reveal-debug
Boolean
Enables debug markers
Elements allows you to define when the animation should be triggered. You can use any of these values when setting the data-reveal-play
attribute.
Once on enter
enter-once
One time animation when first entering the viewport
Always on enter
enter-always
Plays every time the elements enters the viewport
Enter and exit
enter-exit
Plays every time the element enters and exits the viewport
Animations in Custom Components can be set independently on enter and exit, as shown in the sample code.
We offer five types of animations to enhance your user interface:
• Fade
• Slide
• Zoom
• Light Speed
• Rotate
Each animation supports all four directions (Up, Down, Left, Right) and can be triggered for both “In” and “Out” events.
Our animation naming convention is straightforward, following this structure:
{animationName}{Direction}{Event}
For example:
• fadeUpIn
for a fade-in effect moving upwards.
• zoomLeftOut
for a zoom-out effect moving to the left.
This flexible system ensures that you can seamlessly integrate animations tailored to your design needs.
fadeUpIn
Fade Up and In
fadeUpOut
Fade Up and Out
fadeDownIn
...
fadeDownOut
fadeLeftIn
fadeLeftOut
fadeRightIn
fadeRightOut
slideUpIn
slideUpOut
slideDownIn
slideDownOut
slideLeftIn
slideLeftOut
slideRightIn
slideRightOut
zoomUpIn
zoomUpOut
zoomDownIn
zoomDownOut
zoomRightIn
zoomRightOut
zoomLeftIn
zoomLeftOut
lightSpeedLeftIn
lightSpeedLeftOut
lightSpeedRightIn
lightSpeedRightOut
lightSpeedUpIn
lightSpeedUpOut
lightSpeedDownIn
lightSpeedDownOut
rotateUpIn
rotateDownIn
rotateRightIn
rotateLeftIn
rotateUpOut
rotateDownOut
rotateRightOut
rotateLeftOut
See
See
See .
See
See
See