Skip to main content

SwiftUI animation example

SwiftUI Animated Icons: Symbol Effects in Action

iOS 17 added .symbolEffect for bounce, pulse and variable color animations on SF Symbols. These three icons show the same kinds of motion drawn from scratch, so they work anywhere: the bell swings on a damped spring, the Wi-Fi arcs light up in sequence, and the checkmark draws itself inside a circle.

  • 4.4 KB file
  • 3 live inputs
  • SwiftUI runtime
Live, try it

How this symbol effects works

  • The bell's angle is a damped oscillation started by a tap, with the clapper lagging behind the body.
  • Wi-Fi arcs light up one after another, the variable-color effect, and loop while active.
  • The checkmark is stroked progressively; each icon fires "trigger" when tapped.

Add it to your SwiftUI app

Install ExodeUI (Swift Package), download the file below, and paste this. The code updates as you customize. Other runtimes are in the other tabs.

import SwiftUI
import ExodeUI

// Add swiftui-symbol-animation.exode to your app target (download it below).
struct SwiftuiSymbolAnimationView: View {
  @StateObject private var controller = ExodeUIController()
  private let json = (try? String(contentsOf: Bundle.main.url(forResource: "swiftui-symbol-animation", withExtension: "exode")!)) ?? "{}"

  var body: some View {
    ExodeUICanvas(
      artboardJson: json,
      fit: "Layout",
      controller: controller,
      onReady: { },
      onTrigger: { name, _ in
        // fires: 'trigger'
      }
    )
    .frame(height: 400)
  }
}

Inputs

InputTypeDefaultRange
accentText#0a84ffhex colour
inkText#f5f5f7hex colour
bgText#0c0c0fhex colour

Events: trigger

More SwiftUI animations

The same idea in other frameworks: React like heart icon · Flutter morphing icons · JavaScript success checkmark