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.
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.
Keep browsing
Nearby collections, then every category in the library.
- Animations16Springs, gesture physics, transitions and morphs, across every category.
- Liquid Glass5Correct iOS 26 Liquid Glass with Material fallbacks.
- AI6Streaming replies, thinking states, prompt chips and answer sources.
- Backgrounds2Quiet atmospheres: a Metal silk shader and a touch-reactive dot grid.
- Buttons and controls7Buttons and dials with press depth, hold, drag and outcome states.
- Inputs and forms17Tracks, steppers, rails and fields built for the thumb, down to addresses, map pins and signatures.
- Cards5Cards with depth, motion, parallax and gesture-driven stacks.
- Lists7Rows, grids and carousels with swipe, drag-to-select, follow-the-latest and completion physics.
- Navigation7Floating docks, tracking tabs, stretchy headers and an A to Z index.
- Sheets5Toasts, confirmations, permission moments and guided tours.
- Feedback5Reactions, ratings, status morphs, skeletons and outcomes.
- Motion1Gesture modifiers with real physics.
- Data and charts6Scrubbable charts, rings, streak heatmaps, live stats and odometers.
- Media8Photo viewing and cropping, story playback, attachments and link previews.
- Haptics33Pieces that tick, tap and confirm at the moment that matters.
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.