LogoLogo
  • Introduction
  • Early Access
  • System Requirements
  • Elements FAQ
  • Purchasing FAQ
  • Licensing FAQ
    • License Types
  • Why Elements?
    • Static Website Benefits
    • Build a Digital Garden
  • Community Forum
  • Marketplace
  • Elements App
    • Getting Started
    • Keyboard Shortcuts
    • Design System
    • Editor
      • Apple Intelligence
      • Component Inspector
      • Dark Mode
      • Node Browser
      • Page Manager
      • Preview
      • Resources
      • Responsive Breakpoints
      • Workspaces
    • Components
      • Built-in Components
        • Accordion
        • Background
        • CMS
          • Twig Syntax
          • CMS Online Editor
        • Button
        • Container
        • Divider
        • Dropdown
        • Flex
        • Filter
        • Filter Tags
        • Form
        • Gallery
        • Grid
        • Image
        • Menu
        • Modal
        • Modal Close
        • Reveal
        • Image Slider
        • SVG
        • Text
        • Top Pages
        • Typography
        • Video
      • Common Controls
        • Link
        • Layout
        • Sizing
        • Spacing
        • Transitions
        • Effects
        • Filters
        • Transforms
        • Borders
        • Advanced
      • Custom Components
    • Templates
      • Global Templates
    • Site Settings
      • Template
      • Publishing
    • Theme Studio
      • Theme
      • Colors
      • Screens
      • Font Family
      • Font Size
      • Spacing
      • Shadows
      • Border Width
      • Border Radius
      • Typography
    • How to
      • Add an Icon Inside a Button
      • Adjust Smooth Scroll Speed
      • Apply Anchor Scroll Padding
      • Add Snow to your Website
      • Build a Sticky Menu
      • Center Align Components
      • Create a Card
      • Site Banner with Text
      • Make a two column layout
    • Resources
    • Troubleshooting
    • SEO
    • Robots.txt
    • Advanced
      • URL Scheme
  • Elements Language
    • Introduction
      • Getting Started
      • Component Styling
    • Element Pack
      • info.json
      • Components
        • info.json
        • Icons
        • Properties.json
          • Grouping Controls
          • Default Values
          • General Structure
            • Title
            • ID
            • Format
            • Visible
            • Enabled
            • Responsive
          • UI Controls
            • Divider
            • Heading
            • Image
            • Information
            • Link
            • Number
            • Resource
            • Segmented
            • Select
            • Slider
            • Switch
            • Text
            • Text Area
            • Theme Border Width
            • Theme Border Radius
            • Theme Color
            • Theme Font
            • Theme Spacing
            • Theme Shadow
            • Theme Text Style
            • Theme Typography
        • Templates
          • Portal
          • Backend
          • Conditional Statements
          • Regular Expressions
          • Looping
          • Includes
          • Image Resources
          • HTML
            • Anchor
            • Raw
            • Editable Content
            • Dropzones
            • Inline templates
          • CSS
          • JavaScript
        • Assets
        • Hooks.js
          • Common use cases
          • Passing data to templates
          • Working with Collections
          • Working with UI Controls
          • Working with Resources
          • Available Functions
            • rw.addAnchor
            • rw.getBreakpoints
            • rw.getBreakpointNames
            • rw.getResponsiveValues
            • rw.resizeResource
            • rw.setProps
            • rw.setRootElement
          • Available Data
            • rw.collections
            • rw.component
            • rw.node
            • rw.pages
            • rw.project
            • rw.props
      • Collections
        • Data collections in Hooks.js
        • Accessing Data in Templates
        • Collections in properties.json
      • Shared Files
        • Assets
        • Templates
      • Themes
    • Troubleshooting
  • Elements Cloud
    • Getting Started
    • Troubleshooting
  • Elements Store
    • Getting Started
    • Add-on Guidelines
  • Branding
    • Logotype
    • Logotype Animated
    • Icon
  • Legal
    • Subscription Terms of Service
    • Cloud Terms of Service
    • Frameworks
Powered by GitBook

We are Realmac Software. We make nice things.

On this page
  • Advanced Usage
  • Available Play Methods
  • Animations
  • Available Animations
  • Full Example

Was this helpful?

Edit on GitHub
Export as PDF
  1. Elements App
  2. Components
  3. Built-in Components

Reveal

Animate components when they enters the viewport

PreviousModal CloseNextImage Slider

Last updated 18 days ago

Was this helpful?

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.

Advanced Usage

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.

Attribue
Type
Notes

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

Available Play Methods

Elements allows you to define when the animation should be triggered. You can use any of these values when setting the data-reveal-playattribute.

Name
Value
Notes

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

<div
    data-reveal
    data-reveal-animation="lightSpeedRightIn"
    data-reveal-exit-animation="fadeUpOut"
>

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.

Available Animations

Animation Name
Description

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

Full Example

<div
    data-reveal
    data-reveal-scrub="false"
    data-reveal-animation="fadeUpIn"
    data-reveal-exit-animation="fadeUpOut"
    data-reveal-distance="200px"
    data-reveal-degrees="90"
    data-reveal-play="enter-exit"
    data-reveal-start="top bottom"
    data-reveal-end="top top" 
    data-reveal-easing="power1.out"
    data-reveal-duration="0.5"
    data-reveal-delay="0"
    data-reveal-id="optional-reveal-id"
    data-reveal-debug="false"
>

By using the data-reveal-* attributes in your , you can take advantage of the Animation framework built into Elements.

See

See

See .

See

See

See

Animations in can be set independently on enter and exit, as shown in the sample code.

Custom Components
Custom Components
GSAP docs
GSAP docs
GSAP docs
available animations
available animations
available play methods