UNPKG

@erosnicolau/animated-text

Version:

Advanced React animated text component with comprehensive animation effects

55 lines (54 loc) 1.2 kB
/** * Animation Constants * Centralized animation durations, delays, and timing values */ // Animation Durations (in milliseconds) export const ANIMATION_DURATION = { FAST: 50, QUICK: 150, NORMAL: 200, MEDIUM: 250, STANDARD: 300, SLOW: 400, EXTENDED: 500, LONG: 600, EXTRA_LONG: 800, VERY_LONG: 900, SUPER_LONG: 950, ULTRA_LONG: 1100, PERFORMANCE_RECOVERY: 2000 }; // Animation Delays export const ANIMATION_DELAY = { IMMEDIATE: 0, SHORT: 300, MEDIUM: 600, LONG: 1200 }; // Animation Easing export const ANIMATION_EASING = { EASE_IN_OUT: 'ease-in-out', EASE_OUT: 'ease-out', EASE_IN: 'ease-in', LINEAR: 'linear' }; // Transition Durations (for CSS transitions) export const TRANSITION_DURATION = { INSTANT: 0.1, FAST: 0.2, NORMAL: 0.5, MEDIUM: 0.6, SLOW: 0.8 }; // Stagger Animation Delays (for Framer Motion staggerChildren) export const STAGGER_DELAY = { FAST: 0.1, NORMAL: 0.2, SLOW: 0.3 }; // Performance thresholds for animations export const ANIMATION_PERFORMANCE = { FPS_THROTTLE_MS: 16, // ~60fps throttling DEBOUNCE_MS: 30, CONFLICT_RESOLUTION_TIMEOUT_MS: 500 };