Hello ! i want to add a nav bar with a button that reduce sidebar element to my dash (it contains a side bar )
Like this :
i used this code to create my dash side bar :
SIDEBAR_STYLE = {
“position”: “fixed”,
“top”: 0,
“left”: 0,
“bottom”: 0,
“width”: “16rem”,
“padding”: “2rem 1rem”,
“background-color”: “#f8f9fa”,
}
the styles for the main content position it to the right of the sidebar and
add some padding.
CONTENT_STYLE = {
“margin-left”: “18rem”,
“margin-right”: “2rem”,
“padding”: “2rem 1rem”,
}
sidebar = html.Div(
[ #html.Img(src=app.get_asset_url(“logo.jpg”)),
html.Img(src=app.get_asset_url(‘logo.jpg’),style={“width”:‘90%’}),
#html.H2(“Sidebar”, className=“display-4”),
html.Hr(),
#html.P(“A simple sidebar layout with navigation links”, className=“lead”),
dbc.Nav(
[
dbc.NavLink([html.I(className="fa fa-home"), html.Span(" Home")], href="/", active="exact"),
html.Hr(),