Text · 4 free pieces

SwiftUI text effects

Headlines that reveal word by word, Liquid Glass drawn on real glyph outlines, and paragraphs that clamp to a line limit with a real Read more.

All components

About these pieces

One self-contained Swift file each, Apple frameworks only, from iOS 17.

Text is where an app's tone shows first, and it is also where SwiftUI leaves the most to you. Text Reveal staggers a headline in by characters, words or lines from a baseline mask, then wipes highlight blocks behind the phrases that matter. Glass Text renders iOS 26 Liquid Glass on the actual glyph outlines, with a Material fallback below iOS 26 and a solid fill under Reduce Transparency.

Expandable Text solves the everyday problem: it measures whether a paragraph is really truncated before it shows a more link, grows to full height without reflow, and VoiceOver always reads the whole text.

Learn the technique: SwiftUI animations guide, Liquid Glass guide.

Questions

How the pieces work, and how to build the same thing yourself. Every piece's page has its full notes.

How do I animate text in SwiftUI?

For numbers, contentTransition(.numericText()) animates digit changes. For headlines, split the string into words or characters and animate each with a staggered delay, masking each line so glyphs rise from a baseline. Text Reveal packages that, with a stagger sized to land in under a second.

How do I add a Read more button to Text in SwiftUI?

Measure the text at its line limit and at full height, and only show the link when the two differ. Expandable Text does that measurement, fades the end of the last line into the link and animates the height change.

Ready to build something better?

85 pieces, one file each, yours to keep. Start with the library or see what the whole app looks like.