Adding dynamically generated URLs to the app
We now want to complete our main layout with a navigation bar, a home page link, as well as a drop-down menu for the countries. To achieve that, we introduce the NavbarSimple component from Dash Bootstrap Components and see how we can use it.
The NavbarSimple component will take a few elements to create the structure we want as follows:
- We first create the navigation bar and give it
brandandbrand_hrefarguments, to indicate what the name would be and where it would link to:import dash_bootstrap_components as dbc dbc.NavbarSimple([     … ], brand="Home", brand_href="/")
- For its
childrenargument, we will add adbc.DropdownMenucomponent. We will also give it alabelvalue so users know what to expect when they click on the menu. We will fill itschildrenargument in the next step:dbc.DropdownMenu(children=[ Â Â Â Â menu_item_1, Â Â Â Â menu_item_2...