Capítulo 36 de 142

Chapter 36: Typewriter effect & typing animations

Core Idea

A 1.3kb React component for typewriter and typing effects, with human-like speed variance, intelligent backspacing, stylable cursors and screen reader support.

Key Concepts

  • Features: First
  • Install: First
  • Dynamic content: When the children prop changes
  • Adjust speed: The animation will emulate "normal" real-world typing speeds

Code Examples

<Typewriter>Hello world!</Typewriter>
  • What it demonstrates: Core usage pattern for Typewriter effect & typing animations.

Key Takeaways

  1. **Natural animation: **Typing speeds and variance emulate real-world behaviour.
  2. Playback control: Easily play and pause animations, perfect for scroll-triggered anima.
  3. Accessible: Correct ARIA labels for screen reader compatibility.
  4. Reactive: Will animate with backspace and typing to the latest provided value.
  5. **Customisable: **Control everything from typing speed and variance to cu.

Connects To

  • Install Motion+ for React: related Motion doc page.