react-magical-typewriter
Version:
A customizable typewriter effect component for React with GSAP animations
38 lines (30 loc) • 1.19 kB
TypeScript
import { default as default_2 } from 'react';
export declare type AnimationStyle = PredefinedAnimationStyle | CustomAnimation;
export declare interface CharacterItem {
char: string;
id: string;
}
export declare interface CustomAnimation {
from?: Record<string, any>;
to?: Record<string, any>;
duration?: number;
ease?: string;
}
export declare type PredefinedAnimationStyle = 'Elegant' | 'Whimsical' | 'Landing' | 'Arise' | 'Rift' | 'Warp' | 'RadialBurst' | 'LiquidDrip' | 'LaserSketch' | 'FlipReveal' | 'PixelGlitch' | 'GhostTrail' | 'ShatterIn' | 'OrigamiReveal';
declare const ReactMagicalTypewriter: default_2.FC<TypewriterProps>;
export { ReactMagicalTypewriter }
export default ReactMagicalTypewriter;
export declare interface TypewriterProps {
text: string;
typingSpeed?: number;
delayAfterTyping?: number;
cursorCharacter?: string;
cursorBlinkSpeed?: number;
charAnimationSpeed?: number;
animationStyle?: AnimationStyle;
ghostTrailColor?: string;
cursorInvert?: 'horizontal' | 'vertical' | 'both' | 'none' | string;
onComplete?: () => void;
className?: string;
}
export { }