What problem does it solve?
Valdi does not support CSS transitions, keyframes, or React-style animation libraries, so developers need guidance on the framework's imperative animation model to animate layout changes, view attributes, and state transitions correctly.
Core Features & Use Cases
- Imperative Animation API: Use
this.animate() and this.animatePromise() with duration, preset curves, custom bezier control points, and spring physics to animate element attribute mutations.
- State-Driven Animations: Use
setStateAnimated() to re-render with new state while animating all resulting view mutations automatically.
- Text Animations: Coordinate per-character or per-word text reveals using
animationTransform on attributed text chunks and the <textanimationgroup> container for a shared timeline.
- Use Case: When building an expandable card in a Valdi component, call
setStateAnimated({ expanded: true }, { duration: 0.3 }) so the width and height changes animate smoothly instead of jumping instantly.
Quick Start
Ask the assistant to animate a Valdi component's width and font changes using this.animate with a 0.3 second duration and an ease-in-out curve.