The text “Let’s do this” followed by glitchy characters

Member-only story

CSS Glitchy Text Reveal in 3 minutes

Jhey Tompkins
Prototypr
Published in
3 min readDec 10, 2019

Looking for an interesting text animation on your next project? In this post, we’re going to make the following text reveal animation.

The glitchy text reveal effect we are aiming for where letters scramble to reveal a sentence
Glitchy text reveal in action 😎

To do this, we’ll leverage the power of CSS variable scope 💪

For those in camp TL;DR, scroll down for the demos & code 👍

DISCLAIMER ⚠️

This effect is achievable with only HTML & CSS. I’m using a little JavaScript to enhance the markup. It makes things different on each refresh. I’ll also share a non-JavaScript version though 👍

MARKUP

The first thing we need is some markup ✅

Basic markup

JAVASCRIPT

Here’s that JavaScript.

JavaScript code to enhance our markup 💪

We are using the brilliant Splitting.js to slice up our text into spans.

This enables us to dial in on individual characters 😎 Once we have the result, we loop over the character elements and apply inline CSS variables. These variables dictate what glitchy characters should show. The resulting markup for a character might look something like this.

Create an account to read the full story.

The author made this story available to Medium members only.
If you’re new to Medium, create a new account to read this story on us.

Or, continue in mobile web

Already have an account? Sign in

Published in Prototypr

Prototyping, UX Design, Front-end Development and Beyond 👾 | ✍️ Write for us https://bit.ly/apply-prototypr

Written by Jhey Tompkins

I make awesome things for awesome people!

Responses (1)

Write a response

I "forked" yours and changed a few things. For ease of use I converted Pug to Html, Stylus to Css. I left it there in codepen. https://codepen.io/luis7lobo9b/pen/jOpYMXM

--