Text Writer

The TextWriter component creates a typing animation effect for text, where characters appear one by one to mimic real-time typing.

This content will smoothly reveal on scroll

Installation

  1. Add the following code into your project
  2. Update the import paths according to your project setup

Usage

PropTypeDefaultDescription
textstring-The text to be animated (required)
delaynumber0.05Time delay between each character (in seconds)
classNamestring''Additional CSS classes for styling
animationConfigAnimationProps{}Custom Framer Motion animation configuration
cursorColorstring'#000'Color of the typing cursor
cursorWidthstring'2px'Width of the typing cursor
cursorStylestring'solid'CSS border-style of the cursor
onComplete() => void() => {}Callback function executed when typing is complete
eraseOnCompletebooleanfalseWhether to erase the text after completion
eraseDelaynumber2000Delay before erasing starts (in milliseconds)
loopbooleanfalseWhether to loop the writing and erasing effect