Dash Bootstrap Components Tooltip Multiple Lines

Hey there, i try to format the tooltip text so that I have lines breaks. I tried “
” but this does not seem to work. What is the way to do this?

Best regards!

I had the same problem today and I believe I found a solution. Even though this is old, this might still help somebody in the future, I think.

Here is a code snipped:

import dash_bootstrap_components as dbc
import dash_core_components as dcc

dbc.Tooltip(dcc.Markdown('your first line\nyour second line', style={'white-space':'pre'}))

1 Like

FYI, you can put a list of components as children of a dbc.Tooltip so you could do something like this as well:

    html.P("A first line"),
    html.P("A second line.")