Overview
Text Reveal 2.0

Text Reveal 2.0 beta

Did you like "Text Reveal Animation"? Well it's like that. But better. "Text Reveal 2.0" is a complete rebuild of the original focused on more stable and expandable code. With this Version you can now create the animation character by character which is a lot of times the more desirable way of animating – especially for Headlines. Also it's all neatly packaged and hosted on an external server making it way easier to add to your page as well as being automatically updated for newer functions.

Demo

1. Default Styling

Lorem Ipsum

2. Default with slower speed

Lorem ipsum dolor sit amet

3. Default loading just once

Lorem ipsum

4. faster for longer Text

Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua.

5. fast interval but slower transition speed

Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua.

6. Reveal word by word

Lorem ipsum dolor sit amet

7. Bounce Transition

Lorem Ipsum

8. letter by letter fade

Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua.

9. Different Style

Lorem Ipsum

10. Horizontal reveal

Reveal your headline in a horzotal style

11. Add custom Classes for a completely new style

100% your very own style

Documentation

Parameter
Type
Default
Description
target
string
The Target is the most important parameter of this function. It defines to which element this animation should apply to. Elements can be targeted by their id like this #yourElement or by their class like this .your-element. For more complex selection it's also possible to use the full scope of CSS Selectors. You can find a list of all CSS Selectors here: w3schools.com/cssref/css_selectors.asp
repeat
boolean
true
Defines whether or not the animation should be restarted once the element gets out of view.
transitionSpeed
number
1
Speed of the transition of each letter (or word) from being out of view to being in the final position. This value is defined in seconds.
intervalSpeed
number
50
Delay between starting the transition of each letter (or word). The lower the number the faster the total transition time would be. This value is defined in milliseconds.
selection
string
"character"
Defines how the elements are grouped together during the transition. The values available are "character" or "word".
offsetShow
number
0
The transition usually starts to play once the element is entering the viewport. You can add an offset to this moment by increasing the offsetShow value. That way you can make sure, that the animation only starts playing once more of it is actually in view. This value is defined in pixels.
offsetHide
number
0
The transition usually gets reset once the element is fully outside of the viewport. You can add an offset to this moment by increasing the offsetHide value. This value is defined in pixels.
transition
string
"ease out Quint"
Set a custom transition for the characters (or words) to appear by. You can use the value "bounce" to quickly get a bounce transition or set your own values formated like this: cubic-bezier(.23, 1, .32, 1)
overflow
string
"hidden"
By changing the overflow parameter to "visible" you can achieve a very different animation. Be sure to pair this Parameter with an "initialOpacity" of "0" so that the characters (or words) don't just move up without being out of you in any way.
initialOpacity
string
"1"
Change the initial opacity to have an extra bit of transition. Try to pair this Parameter with "overflow:visible" to achieve a new style of transition effect.
initialPosition
string/number
"auto"
By default the initial position gets calculated for the character (or word) to be exactly out of view. Change this parameter to set this the out of view position to what you prefer. This value is defined in pixels.
customLineHeight
string
By default Text Reveal 2.0 adds the the line-height set in the text field converted to pixel. If you want to use a different unit like vh or em you have to manually set the value with this parameter. Possible values could be "50vh", "1.1" or "1.6em". Attention: Always set the Attribute as a string.
direction
string
"vertical"
Change the direction of the letters or words moving into view by modifiying the direction parameter. Options are "vertical" and "horizontal". This parameter works best when used with a letter by letter reveal selected (default).
charClass
string
To customize the animation even further you can add a custom class to each character or word by using this parameter.
charHiddenClass
string
Add a class which is added to each character or word on it's hidden state to customize the animation with custom css.

Code

Attention: This code is linked to external files which might change or become unavailable in the future!

To make the code below easier and faster to implement it relies on files which are hosted externally on our servers. Because of that we cannot give you a 100% guarantee, that these files will always stay the same, or will always be accessible through the link provided. For better reliability we therefor advice you to host these files by yourself or add its content directly in Webflow. You can learn more about this topic here.
https://eseassets.ch/globalscripts/code/code.js
Download File

Add this code inside the <head> tag on your page.

Copy code
The code in here is only visible on the published website.
Go to codeblocks.webflow.io or take the code from the actual custom code field of this page

Add this code before the </body> tag on your page.

Copy code
The code in here is only visible on the published website.
Go to codeblocks.webflow.io or take the code from the actual custom code field of this page
We won't take any responsibility for the code provided. It may not be set up according to best practices of programming or built in the most efficient way possible. It's just here so solve your problem.

Get the source code for
free by signing up to Codeblocks