Automatically Change the font size

Hi, I’m making a language app, when i display one word it works fine:

however when display a longer sentence, I need the text to automatically re-size so it fits into the text area, as you can see it’s too big:

Any help on how to achieve this would be greatly appreciated!

p.s. It also needs to be aligned to the side when it’s a longer sentence. not sure how to specify that through the formula in the binding.

Where are you getting the texts from? A back-end?

Exactly. It’s being pulled from xano db

I’m going to refer to @aurelie, @Kevin or someone else for this as most definitely you will need some custom JS

Ok, thank you Luka, looking forward to what is advised by others.

Hi @aurelie , @Kevin ,

Would love to hear any suggestions and bright ideas you may have for this?

By error and try you could find a range of font size depending on your text length, but if your div has a fix size i do not see a better way to do this.

Maybe you can run a while loop when you receive your back-end data and decrease the font size untill the text does not overflow the div