Skip to content

Instantly share code, notes, and snippets.

@jdegene
Last active October 7, 2022 16:01
Show Gist options
  • Save jdegene/e288341cbdf884096de9588e76cfff74 to your computer and use it in GitHub Desktop.
Save jdegene/e288341cbdf884096de9588e76cfff74 to your computer and use it in GitHub Desktop.
sidebar = html.Div(
[ # add some header text
html.H2("My App", className="display-4",
style={'textAlign': 'center', 'font-variant': 'small-caps'}),
html.Hr(), # this adds a horizontal line
html.H3( # H3 is a smaller header than H2
"Data Analytics", className="display-8", style={'textAlign': 'center'}
),
# add the actual links
dbc.Nav(
[
dbc.NavLink("Page 1", href="/", active="exact"),
dbc.NavLink("Page 2", href="/page2_url", active="exact"),
],
vertical=True, # well, that means not horizontally
pills=True, # adds a blue square around the active selection
style={"font-size":20, 'textAlign': 'center'}
),
],
className="sidebar_style"
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment