How can i add new lines in dbc.ModalBody('Text in first line \n Text in second line')

How can i add new lines in dbc.ModalBody(‘Text in first line \n Text in second line’)

The result in the modal should be:

Text in first line
Text in second line

Please help me out. Thanks in advance.

hi, i write sample code.


dbc.Modal(
[
dbc.ModalHeader(…),
dbc.ModalBody([
html.Div(“Text in first line”),
html.Div(“Text in second line”),
]),
dbc.ModalFooter(…),
],
id=“hogehoge”,
)

1 Like

Thanks alot :slight_smile: for this simple hack