Gluphicons in bootstrap buttons

In bootstrap it is possible to use glyphicons in buttons by adding a span element in the button text.

How is this acomplished with the dash_bootstrap_components button?

You can do the same thing, add a html.Span component as a child of the button. For example using font-awesome

dbc.Button(
    html.Span(["Button", html.I(className="fas fa-plus-circle ml-2")])
)

Which looks like this

image

Make sure you link to the font-awesome stylesheet at the same time.

FONT_AWESOME = "https://use.fontawesome.com/releases/v5.7.2/css/all.css"

app = dash.Dash(
    external_stylesheets=[dbc.themes.BOOTSTRAP, FONT_AWESOME]
)