✊🏿 Black Lives Matter. Please consider donating to Black Girls Code today.
🧬 Learn how to build RNA-Seq data apps with Python & Dash. Register for the May 20 Webinar!

Use a css stylesheet and a dash bootstrap theme on the same app

Hello. I am trying to use a dash bootstrap theme and an external css stylesheet together but i am not sure how to use them together on the external_stylesheets parameter . Any help would be very appreciated.

import dash
import dash_bootstrap_components as dbc
external_stylesheets = ["https://codepen.io/chriddyp/pen/bWLwgP.css"]
app = dash.Dash(__name__, external_stylesheets=[dbc.themes.SUPERHERO])

You can just put multiple links to stylesheets (note that that’s all that dbc.themes.SUPERHERO is) in the list, like this

import dash
import dash_bootstrap_components as dbc
external_stylesheets = ["https://codepen.io/chriddyp/pen/bWLwgP.css", dbc.themes.SUPERHERO]
app = dash.Dash(__name__, external_stylesheets=external_stylesheets)

Be warned that bWLwgP.css uses some of the same CSS class names as Bootstrap, so you might get some conflicts.