Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I wrap text around an image or a composable?

How do I wrap text around an image or a composable?
Something similar to FlowTextView in Jetpack Compose.

I am wondering if there is a possibility to leave a certain space free so that if the text is too long it breaks a line and writing continues underneath the free space completely normally without the space being overwritten.

I have this:

enter image description here

I want to do this:

enter image description here

I try to do this with compose for desktop but should be the same as with android jetpack compose.
I do not know if it is, for now, possible but I can't find a way to manipulate the Text composable.
Found PlaceHolder and TextLayoutInput but i don't know how to use it. Maybe impossible.

like image 572
Zen1000 Avatar asked Sep 11 '25 21:09

Zen1000


1 Answers

Kind of an old question but in Compose you can use the Text Flow dependency. It has support for wrapping text around any composable and it also allows for fun animations!

like image 192
Lucas Perretta Avatar answered Sep 14 '25 11:09

Lucas Perretta