Path: blob/master/Dash/Dash_Add_a_customisable_sidebar.ipynb
2973 views
Kernel: Python 3
Dash - Add a customisable sidebar
Tags: #dash #offcanvas #sidebar #customisable #component #library
Author: Florent Ravenel
Last update: 2023-06-05 (Created: 2023-06-05)
Description: This notebook demonstrates how to use the Offcanvas component to add a customisable sidebar to your apps. It is usefull for organisations that need to add a sidebar to their Dash apps.
Input
Import libraries
In [ ]:
Setup Variables
DASH_PORT
: specify a port number for Dashplacement
: a value equal to: 'start', 'end', 'top', 'bottom'; optional: Which side of the viewport the offcanvas will appear from.
In [ ]:
Model
Initialize Dash app
In [ ]:
Create Offcanvas component
Long description of the function: The Offcanvas component is a customisable sidebar that can be used to add content to your Dash apps. It is created using the dbc.Offcanvas
function.
In [ ]:
Output
Generate URL and show logs
In [ ]: