From our sponsor: Ready to show your plugin skills? Enter the Penpot Plugins Contest (Nov 15-Dec 15) to win cash prizes!
Today we’d like to share some animated item reveal effects with you. These effects can look quite interesting on image grids, covering and uncovering every grid item when navigating. The idea was sparked by the beautiful and creative JOHO’s website. For the animations we are using the brand new anime.js library by Julian Garnier.
The main idea is to use fitting coupled effects that work well with each other, and to play with organic looking shapes. Using SVG paths allows us to specify several steps for the animation which leaves us with virtually endless possibilities. Today we’d like to show you a couple of examples and we hope that this inspires you for more creative ideas.
The beautiful photography we use in the demos are from Unsplash.com.
In one of the demos, we also include a YouTube video using Plyr, a great, easy to use HTML5 media player by Sam Potts.
Let’s have a look at our grid pages:
<div class="grid-pages">
<div class="grid grid--vertical grid--current grid--style-1" data-path-cover="M 0,0 L 0,0 C 0,0 0,0 0,5 C 0,10 0,10 0,10 L 0,10 Z;M 0,0 L 0,0 C 0,0 5,0 5,5 C 5,10 0,10 0,10 L 0,10 Z;M 0,0 L 10,0 C 10,0 10,0 10,5 C 10,10 10,10 10.1,10 L 0,10 Z" data-duration="400">
<div class="grid__column">
<div class="grid__item">
<!-- ... -->
</div>
<div class="grid__item" data-delay="75">
</div>
</div>
<div class="grid__column">
<!-- ... -->
</div>
<div class="grid__column">
<!-- ... -->
</div>
</div>
<div class="grid grid--vertical grid--style-1" data-path-cover="M 0,0 L 10,0 L 10,0 C 10,0 10,0 5,0 C 0,0 0,0 0,0 Z;M 0,0 L 10,0 L 10,0 C 10,0 10,5 5,5 C 0,5 0,0 0,0 Z;M 0,0 L 10,0 L 10,10 C 10,10 10,10 5,10 C 0,10 0,10 0,10 Z" data-duration="400">
<!-- ... -->
</div>
<!-- other grids and nav -->
</div><!-- /grid-pages -->
Tiny break: 📬 Want to stay up to date with frontend and trends in web design? Subscribe and get our Collective newsletter twice a tweek.
The main container, grid-pages has all the grids that can have their cover and uncover paths defined. There are several data attributes that we can use to customize the animation. Note that all these can also be applied to individual grid items which will overwrite the ones defined in the parent grid:
- data-cover The paths for covering or hiding the item (separated by semicolons)
- data-uncover The paths for uncovering or showing the item (separated by semicolons)
- data-fill The fill color of the paths
- data-duration The time for the whole animation
- data-easing-in The easing for the first step
- data-easing-out The easing for the last step
- data-delay The delay for the animation
If nothing is defined, we’ll simply show the default animation which is one similar to the JOHO’s website. Note that although you can theoretically add any number of path steps, this works best with a maximum of three steps/paths: the first one that hides/shows an item completely, a second one for the middle step and a last one that shows/hides the item completely. Paths need to have associated and an equal number of points, i.e. when you go from a circle to a square, make sure those points that will be the corners, are present in the circle.
We hope you like this little experiment and find it inspiring!
Wow, these effects are just marvelous. Thanks for sharing.
If anyone has issues like I did in Chrome, even with experimental features on, it seems to work fine in FireFox.
Can’t see anything on Chrome 52 :/
Yeah Zak… i’ve experienced some issues on Chrome and in Firefox works almost flawlessly….
Great work Mary! But, do you know what is happening on Chrome? It’s not seems to works as beautifully on Firefox!
PS: Change this comments section to Disqus wouldn’t be a good idea?
Tested in Chrome (51.0.2..), Safari, and Firefox for desktop – works great for me! (Mac OS 10.10.5) And checked it out on iPad mobile Safari – also works great.
Fantastic as always, Mary Lou!
Awesome! Works very well on Edge on Windows 10 Mobile! Thanks for sharing.
Well Manoela sweetheart, I was happy that even I could make it work – I even made those images clickable!. On firefox and IE they work great, but on chrome the images disappear after a second or too.
Thank you so much! I just implemented this on my website this morning. http://trinaparkin.com/
Trina:
Nice implementation amd your work for K Hope. (other links don’t work though).
Awesome! Works very well on Edge on Windows 10 Mobile! Thanks for sharing.
I installed this plugin on my websites and worked like a charm. But since Google Chrome updated to version 52, this script does not work at all anymore ! Can anyone help me to fix it ? It is still working fine on latest Firefox and IE.
Mary Lou! thanks! He came out amazing effect 🙂
ok
Best effect
Is it just me or the demo stopped working on Chrome 52?
It stopped working on Chrome 52 for me as well. Running on Mac Os 10.11.3
Hey everybody, thanks so much for the great feedback! We are looking into the problem related to the latest Chrome update and post a fix as soon as possible. Thanks, cheers, ML
Looks like we have a problem with the new version of Chrome (here it’s 53.0.2785.89 (64-bit)) and anime.js. The SVG path does not seem to get animated… Hopefully this will get fixed soon. Cheers, ML
Good news. I’m really looking forward to get it fixed on my multiple websites 🙂
Hello,
Any news for fixing this plugin on Chrome ?
Thanks
Still no fix for Chrome’s latests versions ? :/
Hi Thomas,
there’s a new version and it’s fixed now. Please download the new ZIP or GitHub repo. Sorry for not mentioning anything earlier!
Thanks and cheers, ML
is it possible to have a ‘basic’ version of the demo showing just how the transition is achieved between two ‘pages’?
Hi Mary what workflow do you use to create your svgs and make them ready to animate