@pvvng/react-typing-text
Version:
A lightweight and fully customizable typing animation component for React.
23 lines (22 loc) • 689 B
TypeScript
export interface TypingTextOptions {
text: string;
autoScroll?: boolean;
startDelay?: number;
interval?: number;
loop?: boolean;
loopDelay?: number;
className?: string;
style?: React.CSSProperties;
cursor?: React.ReactElement<"span"> | null;
onTypingStart?: () => void;
onType?: (char: string, index: number) => void;
onTypingEnd?: () => void;
}
export interface TypingTextHandle {
pause: () => void;
resume: () => void;
reset: () => void;
skip: () => void;
}
declare const TypingText: import('react').ForwardRefExoticComponent<TypingTextOptions & import('react').RefAttributes<TypingTextHandle>>;
export default TypingText;