anime_from_to: Specify a from/to property range

View source: R/props.R

anime_from_toR Documentation

Specify a from/to property range

Description

Convenience constructor for a two-value property animation that runs from from to to. An optional CSS unit suffix is concatenated into both values during serialisation (e.g. 100 with unit = "px" becomes "100px").

Usage

anime_from_to(from, to, unit = "", ease = NULL)

Arguments

from

Numeric. Starting value.

to

Numeric. Ending value.

unit

Character. Optional CSS unit suffix, e.g. "px", "%", "deg".

ease

Optional easing override for this property alone, an anime_easing object or an Anime.js easing name string.

Value

An anime_from_to object.

Examples

anime_from_to(0, 1)
anime_from_to(0, 360, unit = "deg")
anime_from_to(0, 1, ease = anime_easing_spring())


animejs documentation built on Aug. 21, 2026, 5:17 p.m.