AI CSS Animations

Blur In

The text comes into focus from a heavy blur. A filter transition that feels like a camera pulling focus; keep it under a second or it reads as slow.

Also known as: focus in text, unblur text, blur reveal.

Into focus

HTML

<div class="txt-blur-in">Into focus</div>

CSS

.txt-blur-in {
  --c: var(--txt-color, #3b82f6);
  font-size: var(--txt-size, 32px);
  font-family: system-ui, sans-serif;
  font-weight: 700;
  line-height: 1.2;
  color: var(--c);
  opacity: 0;
  animation: txt-blur-in-focus 0.9s ease-out forwards;}
@keyframes txt-blur-in-focus {
  from { opacity: 0; filter: blur(12px); }
  to   { opacity: 1; filter: blur(0); }
}

@media (prefers-reduced-motion: reduce) {
  .txt-blur-in, .txt-blur-in *, .txt-blur-in::before, .txt-blur-in::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

Customizing this snippet

  • Color: set --txt-color on the element or a parent. Currently previewing #3b82f6.
  • Font size: set --txt-size. Every other dimension is in em, so the whole thing scales together. Currently previewing 40px.
  • Speed: change the duration on the transition or animation shorthand. Staggered delays are relative, so they keep their rhythm.
  • Reduced motion: the rule at the end of the CSS turns the motion off for people who asked their OS for less of it. Keep it.

Similar text animations