ForgeUI leverages Framer Motion to deliver smooth, declarative animations across all components. Every animation is carefully crafted for performance and user experience.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/AmanShakya0018/forgeui/llms.txt
Use this file to discover all available pages before exploring further.
Framer Motion integration
ForgeUI usesmotion/react for all animations. Components import motion elements and animate them using:
- Initial/Animate states - Define start and end states
- Transitions - Control timing, easing, and delays
- Layout animations - Automatic animations when layout changes
- Variants - Reusable animation configurations
Animation patterns
Staggered animations
TheTextReveal component demonstrates staggered word reveals using the stagger utility:
Character-by-character animations
TheAnimatedForm component shows how to animate individual characters with custom delays:
Layout animations
TheAnimatedTabs component uses layoutId for smooth morphing between states:
layoutId prop automatically animates the background as it moves between tabs.
Spring animations
Spring physics create natural, bouncy animations:- stiffness: How quickly the spring moves (higher = faster)
- damping: How quickly the spring settles (higher = less bounce)
SVG path animations
TheAnimatedCheckmarkCircle component animates SVG stroke paths:
strokeDashoffset to 0 to create a drawing effect.
Timing and easing
Common easing functions
ForgeUI uses these easing functions for different animation types:- easeOut
- easeInOut
- linear
Used for entrance animations and reveals. Creates a fast start with gradual deceleration.
Duration guidelines
- Micro-interactions: 0.1-0.2s (button hovers, toggles)
- UI transitions: 0.3-0.5s (tabs, modals, cards)
- Complex animations: 0.5-1s (multi-step sequences)
- Background effects: 2s+ (shimmer, gradients)
AnimatePresence
UseAnimatePresence to animate components when they’re removed from the DOM:
mode="popLayout" ensures siblings don’t animate when one element exits.
Performance optimization
Use transform and opacity
Animatetransform and opacity properties for best performance:
Disable animations during resize
The theme provider disables transitions on theme change:Will-change for complex animations
For animations that run continuously:Customizing animations
Override timing
Most components accept timing props:Custom transitions
Provide custom transition objects:Disable animations
Setinitial={false} to disable entrance animations:
Best practices
Respect user preferences
Respect user preferences
Check for reduced motion preferences:
Keep it subtle
Keep it subtle
Animations should enhance, not distract. ForgeUI uses:
- Small movements (5-20px)
- Short durations (0.1-0.5s)
- Subtle opacity changes (0-1)
Animate on user action
Animate on user action
Trigger animations in response to user interactions rather than on mount. This provides better feedback and feels more responsive.
Use consistent timing
Use consistent timing
Maintain consistent timing across similar animations. ForgeUI uses:
- 0.2s for micro-interactions
- 0.3s for UI transitions
- 0.5s for complex animations
Real-world examples
Continuous shimmer effect
FromTextShimmer component:
Pulsing glow effect
FromAnimatedOTP component:
Coordinated sequence
FromAnimatedForm component showing multiple animations with calculated delays: