From our sponsor: Meco is a distraction-free space for reading and discovering newsletters, separate from the inbox.
Today we’d like to share some inspiration for letter effects with you. We wanted to explore some simple, creative animations for display typography and large headlines using anime.js. These kind of animations can really enhance a certain message; combining these effects with a fitting font and playing with transforms opens up a huge range of possibilities. We hope this set inspires you and gives you some ideas on how to use an animation library like anime.js for this purpose.
For the effects we created a little plugin that can be used as follows:
// Initialize
var txt = new TextFx(this.el.querySelector('.title'));
// Show letters:
// txt.show([effect] [,callback]);
// If nothing is passed, then there's no animation.
// ´effect´ can either be one of the predefined effects: ['fx1',...,'fx17'] or
// an object literal representing both, in and out animations (anime.js based).
// Example:
effect = {
in: {
duration: 500,
delay: function(el, index) {
return 250+index*40;
},
easing: 'easeOutExpo',
opacity: 1,
translateY: ['50%','0%']
},
out: {
duration: 500,
delay: function(el, index) {
return index*40;
},
easing: 'easeOutExpo',
opacity: 0,
translateY: '-50%'
}
}
// ´callback´ is the callback function, after all the letters finished the animation.
// Hide letters:
// txt.hide([effect] [,callback]); (same logic of show)
Tiny break: 📬 Want to stay up to date with frontend and trends in web design? Subscribe and get our Collective newsletter twice a tweek.
For more info on how to use anime.js, check out the documentation.
The essential stylesheet for the effect itself is lettereffect.css. Note that we’ve created a little slideshow script to navigate through the different words to showcase the effects.
Browser Support:- ChromeSupported
- FirefoxSupported
- Internet ExplorerSupported from version 11+
- SafariSupported
- OperaSupported
References and Credits
- anime.js by Julian Garnier
- Images by Unsplash.com and pngimg.com
- Charming.js by Yuan Qing
- imagesLoaded by Dave DeSandro
- Line Maker by Codrops
Loved the Muse references at number 4 🙂
Nothing is happening for me on Firefox (49.0.1) or Chrome. 🙁
Nothing happened on iOS Safari, either.
No console errors, and nothing appears to have not loaded.
Oh, whoops, I see it now. I didn’t realize you had to click the next/previous buttons. I thought those jumped between the different effects.
Sorry!
Awesome work! Question, how would I implement this to change phrases/words automatically, for instance, like auto-typing?
Didn’t checked the code in detail but pretty sure setInterval will do de job … but if you don’t have any interactions that trigger the animations you can do this with pure css animations if you’r word are correctly formatted.
moveItem = function(){slideshow.next();}
setInterval(‘moveItem()’, 1000);
Where to place this auto-typing code ?
Wow! such nice and many effects! really inspiring!
Was looking for Hysteria but could’t find it 🙂
Very nice. I copied and it sort of works for me. In my case after you click Next or Previous, the letters do animate. but all of them jump down by about 100px. 🙁
This is the disadvantage of those who have older browser, they will not enjoy the appealing effects
#18 is goofey … hohoho ^.^’
Wow pretty cool effects!.:)
STUNINGGGGG I love BALI
Very cool. Better than After Effects.
Salvador, Manus, Brasil 🙂
great work!
That’s pretty cool!
#8 the best
The advertising in some posts is a little disturbing. But i like your page very much.
Hi Carsten, thanks for your feedback. Could you please tell us a bit more on why you find the advertising disturbing? Your feedback would help us a lot. Thank you.
Wow! I can’t choose in 18 different letter effect because, all looks awesome. Thanks for sharing this.
Awesome stuff!
#7 🙂
How can auto play?
It is very good tips but i want to ask one question, is it work with IOS bowers?
Very cool!
Have include multi Letter Effects in one page?
How can i add Slide Active dot ? Please help
Hello, Thank you very much for the post.
I have just a question : how can we trigger the animation to an anchor (not the next / prev button) from the page
Ex : anchor1 | anchor2| anchor3