UNPKG

typingfx

Version:

Customizable, smooth, and snappy typing animations for React — built for natural, human-like effects with minimal config.

20 lines (19 loc) 910 B
import { ReactNode } from "react"; import { ComponentAnimation } from "./type-out"; /** * Wraps text nodes in <span> with classes and handles nested JSX structure. * Supports waiting durations as numeric values. */ export declare const setupTypingFX: (steps: ReactNode[], componentAnimation?: ComponentAnimation) => ReactNode[]; /** * list elements and apply custom CSS vars */ export declare const listElements: (root: HTMLElement) => HTMLElement[][]; /** Update element styles after type animation */ export declare const updateAfterTypeAnim: (el: HTMLElement) => void; /** Update styles after del animation */ export declare const updateAfterDelAnim: (el: HTMLElement) => void; /** * Handles the chain of animation listeners for typing + deleting effects across steps. */ export declare const addAnimationListeners: (elements: HTMLElement[][], repeat: number, noCursorAfterAnimEnd: boolean) => void;