Icons that move
between states

40 animated icons for Jetpack Compose and Compose Multiplatform. Pass a state and the icon animates. No Lottie files, no XML, no assets.

compose-motion-icons:icons:0.3.0
MIT licensed Android, desktop and web 8 categories

Playground

Try every icon

Hover an icon to preview its next state. Click it to try every state, colour and stroke, then copy the Kotlin.

Loading the playground

This browser can’t run the live playground.

It needs WebAssembly GC: Chrome 119, Firefox 120 or Safari 18.2 and newer. Here is every icon animating instead.

Your icons already change state.
Now they can show it.

Why it holds up

Built for real screens

Calm on first load

An icon starts in the state you give it. A list of liked posts doesn’t burst into hearts as it scrolls into view. Only a change animates.

Reverses mid motion

Tap twice quickly and the icon turns back from where it is, taking only the time the remaining distance needs. No jumps, no queue.

Accessible by default

Every icon has a description that follows its state, like “Like” and “Unlike” or “Cart, 3 items”. With system animations off, icons switch instantly.

Stable screenshot tests

Wrap a screen in FreezeMotionIcons and icons jump straight to their state, so Paparazzi and Roborazzi never capture one halfway through.

Install

Three steps, one line each

Step 1

Add JitPack

In settings.gradle.kts, inside dependencyResolutionManagement.

repositories { maven("https://jitpack.io") }

Step 2

Add the library

In your module’s build.gradle.kts.

implementation("com.github.zainkhalid91.compose-motion-icons:icons:0.3.0")

Step 3

Pass your state

The icon animates every time the state changes.

HeartIcon(liked = isLiked)

FAQ

Questions

Do I need Lottie files or any assets?

No. Every icon is drawn in Compose code on a 24 by 24 grid. There are no JSON, XML or image files to ship.

Which platforms does it run on?

Android, desktop (JVM) and web (Wasm), through Compose Multiplatform. This page runs the library itself in your browser.

Will icons animate when a screen first opens?

No. An icon starts in the state you pass it. It only animates when that state changes afterwards.

Can I change the colour, size and stroke?

Yes. Each icon takes color, size and strokeWidth. Set them once for a whole screen with ProvideMotionIconStyle, which also controls the animation speed.

Does it respect reduced motion?

Yes. With system animations turned off, icons switch to their new state instantly, and looping icons like the equalizer stand still.

How do I keep screenshot tests stable?

Wrap the content in FreezeMotionIcons. Icons jump straight to their state and looping icons stop, so every capture is the same.

Can I use it in a commercial app?

Yes. It is MIT licensed, free for personal and commercial use.

How do I ask for an icon?

Open an issue on GitHub. New icons arrive in themed batches until the set reaches 50.

Give your icons
something to do

View on GitHub