Dash Blueprint Components

Hi @STEdyd666, Yes I believe that changes like this are what I am referring to. @PipInstallPython, I’m sure you are correct if I specify everything explicitly in a custom *.css file then this would not be an issue.

My point was that it would be better if blueprint, bootstrap, and others only modify their components, i.e. dbc.Button, and dbpc.Button, and don’t change dcc.Button.

Here is an minimal example with 4 different cases, in each you can see that the layout / styling is slightly different.


1. Dash only

from dash import Dash, dcc, html

app = Dash()
app.layout = html.Div([
    dcc.Input(id='dcc input', type='text', value='dash dcc input'),
    html.Button(id='submit-button-state', children='dash html Button'),
])

if __name__ == '__main__':
    app.run(debug=True)


2. dash_blueprint_components

from dash import Dash, dcc, html
import dash_blueprint_components as dbpc

app = Dash()
app.layout = html.Div([
    dcc.Input(id='dcc input', type='text', value='dash dcc input'),
    html.Button(id='submit-button-state', children='dash html Button'),
])

if __name__ == '__main__':
    app.run(debug=True)


3. dash_bootstrap_components

from dash import Dash, dcc, html
import dash_bootstrap_components as dbc

app = Dash(external_stylesheets=[dbc.themes.BOOTSTRAP])
app.layout = html.Div([
    dcc.Input(id='dcc input', type='text', value='dash dcc input'),
    html.Button(id='submit-button-state', children='dash html Button'),
])

if __name__ == '__main__':
    app.run(debug=True)


4. dash_bootstrap_components and dash_blueprint_components

from dash import Dash, dcc, html
import dash_blueprint_components as dbpc
import dash_bootstrap_components as dbc

app = Dash(external_stylesheets=[dbc.themes.BOOTSTRAP])
app.layout = html.Div([
    dcc.Input(id='dcc input', type='text', value='dash dcc input'),
    html.Button(id='submit-button-state', children='dash html Button'),
])

if __name__ == '__main__':
    app.run(debug=True)

Thanks,
Peter