Add space in dbc.Label component text

Is there a way to add white space in between text in dbc.Label?

This doesn’t work:

dbc.Label("Address: ")

Try this: :slight_smile:

dbc.Label("Address: ", style=dict(marginRight=10))

If you’re using Bootstrap, you can also take advantage of the in-built spacing utilities

E.g. to add a right margin just add className="mr-2" (replace 2 with any integer 0 to 5 or “auto”). To add left and right margins className="mx-2", or margins all around className="m-2" etc.

1 Like