0Pricing
Sveltejs Academy · Lesson

The tweened() Store: Duration and Easing

Interpolate values over a fixed duration with built-in or custom easing.

Duration-Based

The tweened store animates over a fixed duration with an easing function.

Create One

Pass initial value and options.

import { tweened } from "svelte/motion";
const p = tweened(0, { duration: 500, easing: cubicOut });

All lessons in this course

  1. The spring() Store: Physics-Based Animation
  2. The tweened() Store: Duration and Easing
  3. Interpolation Functions
  4. Animating SVG Paths with Motion
← Back to Sveltejs Academy