Function

keyframes

Creates a KeyframesSpec animation, initialized with init.

keyframes

Source set: Common
public fun <T> keyframes(init: KeyframesSpecConfig<T>.() -> Unit): KeyframesSpec<T>

Creates a KeyframesSpec animation, initialized with init. For example:

Keyframes can also be associated with a particular Easing function:

Values can be animated using arcs of quarter of an Ellipse with KeyframesSpecConfig.using and ArcMode:

For a smooth, curvy animation across all the intervals in the keyframes, consider using keyframesWithSpline instead.

Parameters

init Initialization function for the KeyframesSpec animation
Jetpack Compose beyond MaterialFree components, screens and templates for apps that don’t look like Google’s. Copy them into your app, or let your coding agent add them.Browse for free

Content updated: