I come across that often, and you can use
textwrap and Dash’s support for some HTML tags in titles.
The one you can use here is the
split_text = textwrap.wrap('This is a very long title and it would be great to have it on three lines',
[‘This is a very long title and’,
‘it would be great to have it’,
‘on three lines’]
‘This is a very long title and
it would be great to have it
on three lines’
Sorry this forum seems to also accept HTML tags and the previous line is actually on three lines although it should show the
<br> tags! But that’s what you want
<br>s in the the title would be interpreted as HTML tags, and the title should come out in several lines.
The key parameter is the
width parameter, which you can use to customize the length of your lines.
Hope that helps!