leptos-motion-0.3.2 has been yanked.
Leptos Motion
A comprehensive animation library for Leptos with Framer Motion-inspired API.
Features
- Declarative animations with Motion-style API
- Hardware acceleration via Web Animations API with RAF fallback
- Gesture support for drag, hover, tap, and more
- Layout animations using FLIP technique
- Scroll animations with intersection observers
- Type safety with full Rust compile-time validation
- High performance targeting 60fps for 100+ concurrent animations
- Animation presets for common patterns
- Keyframe animations for complex multi-step animations
- Variants for named animation states
Quick Start
use *;
use *;
Core Concepts
Animation Values
Animation values represent different types of animatable properties:
use *;
let opacity = Number;
let position = Pixels;
let rotation = Degrees;
let color = Color;
Transitions
Configure how animations behave:
# use *;
// Spring animation
let spring = Transition ;
// Tween animation
let tween = Transition ;
Gestures
Add interactivity to your animations:
# use *;
# use *;
#