Rendering Animations
Tegaki handles text layout, line wrapping, and animation playback. See the framework guides for framework-specific setup.
Basic usage
Section titled “Basic usage”Styling
Section titled “Styling”Tegaki reads its typography from the container’s own CSS — set font-size,
line-height, color, and letter-spacing however you normally would (inline
style, a class, a CSS variable) and the renderer picks them up, re-measuring
when they change. letter-spacing is applied to the animated strokes just as
the browser would space static text, so spacing, line wrapping, and the drawn
glyphs stay in sync.
Time control modes
Section titled “Time control modes”Uncontrolled
Section titled “Uncontrolled”The component manages its own animation clock:
Options:
speed— playback speed multiplier (default1)loop— restart when animation completes (defaultfalse)playing— pause/resume (defaulttrue)catchUp— speed up when buffered text is ahead (for streaming)
Controlled
Section titled “Controlled”You provide the current time value directly (useful for syncing with external state):
Animation is driven purely by CSS (best performance, no JavaScript animation loop):
Effects
Section titled “Effects”All frameworks accept the same effects configuration:
Effects can also be set to true for defaults: { pressureWidth: true }.
Streaming text
Section titled “Streaming text”For chat-like interfaces where text arrives incrementally, see Streaming Text.