This is a SwiftUI package that adds animations to ordinary Text views. When the input string of the AnimatedText changes, your text will come to life and showcase it's change with a character typing animation.


This animation utilizes the new onChange() function available in iOS 14.(Documentation Here). When the state changes, the new value is sent through the onChange() function before the value is changed. The Needleman-Wunsch algorithm is then used at this time to calculate which characters have changed in the string and generate the shortest list of modifications we can apply to get the new string. This allows the string to animate smoothly to the next value.

Good examples to try it out on are abbreviations and acronyms along with their full word.


  • iOS 14.0+
  • macOS 10.16+

Add Via Swift Package Manager (SPM)

Github Link -


// Three Parameters:
// -- String Input
// -- Character Change Duration (seconds)
// -- Modifier Closure to change text style directly
AnimatedText($input, charDuration: 0.07) { text in

Show us what you made!

We want to see what you've made using this package! Send us pics! Find us on Twitter @TrailingClosure, on Instagram, or email us at [email protected]