# Drawing custom text spans in Compose UI

DevFeed: [Drawing custom text spans in Compose UI](<https://devfeed.tech/articles/drawing-custom-text-spans-in-compose-ui-29020.md>)

Original publisher: [Read original article](<https://saket.me/compose-custom-text-spans/>)

Author: Saket Narayan

Published: 2022-07-12T15:49:24Z

Content type: tutorial

Language: en

Sources: [Saket Narayan](<https://devfeed.tech/sources/saket-narayan.md>)

Topics: [Compose](<https://devfeed.tech/topics/compose.md>), [ui](<https://devfeed.tech/topics/ui.md>), [implementation](<https://devfeed.tech/topics/implementation.md>), [Code](<https://devfeed.tech/topics/code.md>)

Tags: [android](<https://devfeed.tech/tags/android.md>), [animation](<https://devfeed.tech/tags/animation.md>), [compose](<https://devfeed.tech/tags/compose.md>), [compose-ui](<https://devfeed.tech/tags/compose-ui.md>), [library](<https://devfeed.tech/tags/library.md>), [modifiers](<https://devfeed.tech/tags/modifiers.md>), [porting](<https://devfeed.tech/tags/porting.md>), [ui](<https://devfeed.tech/tags/ui.md>)

## AI overview

A tutorial on drawing custom text decorations in Compose UI by annotating text, calculating layout coordinates, and manually rendering animated squiggly underlines. It also demonstrates rounded-corner text backgrounds and packages the implementation as a reusable library.

## Source excerpt

While exploring how text paragraphs are rendered in Compose UI, I nerd sniped myself into porting squiggly underlines from Sam Ruston's Buzzkill app. Sam's animation was implemented using TextView custom spans, but Compose UI does not offer any alternatives for them yet. While our friends at Google are prototyping text modifiers (first, second), I figured [...] The post Drawing custom text spans in Compose UI appeared first on Saket Narayan.