Reputation: 298
I am trying to create a dashboard with python dash and want two or more columns. Unfortunately I always end up with all the content stacked row wise. What am I missing here?
from dash import Dash, dcc, html, Input, Output
import dash_bootstrap_components as dbc
app = Dash(__name__)
app.layout = dbc.Container([
dbc.Row([
dbc.Col([
html.H4('Zeitraum'),
], width=6),
dbc.Col([
html.H4('Test'),
], width=6)
]),
dbc.Row([
dbc.Col([
html.H4('Test2')
], width=6),
dbc.Col([
html.H4('Test3')
], width=6)
]),
])
app.run_server(debug=True)
Upvotes: 0
Views: 497
Reputation: 366
You just have to add an external stylesheet attribute inside your app object, like this:
app = Dash(__name__,external_stylesheets=[dbc.themes.BOOTSTRAP])
Upvotes: 1