leptos-motion-0.1.0-alpha has been yanked.
Leptos Motion
A comprehensive animation library for Leptos with 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
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 *;
view!