Hello everyone, i’m posting for reference since i have a good result by combining dbc, sidebar with Nav component and top static navigation bar using NavbarSimple from here: Nav - dbc docs in addition with the multipage app and url’s from here: https://dash.plotly.com/urls
import dash
from dash import Dash, html, dcc
import dash_bootstrap_components as dbc
app = Dash(use_pages=True, external_stylesheets=[dbc.themes.DARKLY])
app.title='dash nav app'
SIDEBAR_STYLE = {
"position": "fixed",
"top": 0,
"left": 0,
"bottom": 0,
"width": "11rem",
"padding": "2rem 1rem",
"background-color": "#000000",
}
# the styles for the main content position it to the right of the sidebar and
# add some padding.
CONTENT_STYLE = {
"margin-left": "36rem",
"margin-right": "35rem",
"padding": "2rem 1rem",
}
sidebar = html.Div(
[ html.H2("Beyond Dash", className="display-6"),
html.Br(),
html.P("Operations Menu", className="lead"),
dbc.Nav([
dbc.NavLink("Home", href="/", active="exact"),
dbc.NavLink("analytics", href="/analytics", active="exact"),
dbc.NavLink("archive", href="/archive", active="exact")],
vertical=True, pills=True )], style=SIDEBAR_STYLE)
topnavbar = dbc.NavbarSimple([
dbc.NavLink("Active", active=True, href="#"),
dbc.NavLink("Analytics", href="/analytics"),
dbc.NavLink("Another link", href="#"),
dbc.NavLink("Disabled", disabled=True, href="#"),
dbc.NavLink("Page 1", href="#"),
dbc.NavLink("A link", href="#"),
], brand="Menu", brand_href="#", color="dark", dark=True)
app.layout = dbc.Container([
dbc.Row(dbc.Col(topnavbar)),
dbc.Row([
dbc.Col(sidebar, width=2, style={'height': '100%'}, className='mt-1'),
dbc.Col([
html.A('in page container - but not in external pages'),
dash.page_container], width=10 )],
className='my-2', style={'height': '100%'})], fluid=True)
app.run(port=80, debug=True)