# Bring to life your SVGs in the Multiplatform project

DevFeed: [Bring to life your SVGs in the Multiplatform project](<https://devfeed.tech/articles/bring-to-life-your-svgs-in-the-multiplatform-project-99316.md>)

Original publisher: [Read original article](<https://proandroiddev.com/bring-to-life-your-svgs-in-the-multiplatform-project-0d298c15c22a?source=rss----c72404660798---4>)

Author: Robert Levonyan

Published: 2026-10-25T16:37:58Z

Content type: tutorial

Language: en

Sources: [ProAndroidDev](<https://devfeed.tech/sources/proandroiddev-medium.md>)

Topics: [compose-multiplatform](<https://devfeed.tech/topics/compose-multiplatform.md>), [SVG](<https://devfeed.tech/topics/svg.md>)

Tags: [android](<https://devfeed.tech/tags/android.md>), [android-development](<https://devfeed.tech/tags/android-development.md>), [androiddev](<https://devfeed.tech/tags/androiddev.md>), [animation](<https://devfeed.tech/tags/animation.md>), [compose](<https://devfeed.tech/tags/compose.md>), [compose-multiplatform](<https://devfeed.tech/tags/compose-multiplatform.md>), [desktop](<https://devfeed.tech/tags/desktop.md>), [ios](<https://devfeed.tech/tags/ios.md>), [ios-app-development](<https://devfeed.tech/tags/ios-app-development.md>), [kotlin-multiplatform](<https://devfeed.tech/tags/kotlin-multiplatform.md>), [multiplatform](<https://devfeed.tech/tags/multiplatform.md>), [svg](<https://devfeed.tech/tags/svg.md>), [vector](<https://devfeed.tech/tags/vector.md>), [xml](<https://devfeed.tech/tags/xml.md>)

## AI overview

The article shows how to build a looping, animated offline ghost in Compose Multiplatform from SVG paths, without shipping a GIF, Lottie file or video. It draws the ghost before a static gravestone so the stone hides it, then animates its rise, sway, drift and sink with four synchronized keyframe tracks in one `rememberInfiniteTransition`; viewport clipping makes it disappear underground. A shared AGSL/SkSL shader adds pixel wobble: Android uses `RuntimeShader` and `RenderEffect` on API 33+, while iOS, Desktop and Web use Skiko's runtime shader APIs through a shared `skikoMain` source set. Older Android devices skip the shader but retain the basic motion. The article also describes a frame-clock time source and warns that shader sampling should stay 1:1 to avoid scaling the artwork.

## Source excerpt

Let's be honest: "No internet connection" is the saddest screen in any app. Your user wanted to do something, the Wi-Fi said no, and now they're staring at a grey box with an OK button. We can do better. We can give them a ghost. The idea comes from the lovely No internet connection GIF on Dribbble: the Wi-Fi signal has died, it's been properly buried, and its ghost keeps popping out of the grave to say hi. Before writing any animation code, let's meet the cast: The sky -- a purple gradient. The gravestone -- a static drawable. It just stands there. The deceased -- Icons.Rounded.WifiOff carved into the stone. RIP. The ghost -- the star. Rises, sways, drifts, sinks. Forever. Three of the four cast members just stand still, so they're plain Image composables. All the drama goes into one vector. And since everything lives in commonMain, the same ghost haunts Android, iOS, Desktop and the Web (Wasm and JS). One ghost, five houses. Very efficient haunting. The stage is a 300dp Box sitting on top of the gradient: Column( modifier = Modifier .fillMaxSize() .background( brush = Brush.linearGradient( colors = listOf(gradientStartColor, gradientEndColor), tileMode = TileMode.Clamp, ) ), verticalArrangement = Arrangement.Center, horizontalAlignment = Alignment.CenterHorizontally, ) { Box(modifier = Modifier.size(300.dp)) { // 1. the ghost (drawn first, so it sits behind the stone) // 2. the gravestone // 3. the dead Wi-Fi signal } } Look at the order inside the Box. The ghost is drawn first, so the gravestone is painted right over it. That's our "hiding behind the grave" trick, and it costs exactly zero lines of masking code. In Compose, whoever comes last gets to stand in front -- just like in a group photo. From SVG to a composable vector The gravestone is the easy one. It never moves (it's a gravestone, it's had a lot of practice). I converted its SVG to a vector XML with Android Studio's Vector Asset tool, dropped it into commonMain/composeResources/drawable, and loaded it with