Dash Bootstrap Templates V1.0.0 New: Theme Switch Components

Hi @stefan_1803

In response to your questions:

  1. I’d recommend using dbc.Button rather than html.Button so the theme gets updated automatically. For other dcc components, this post on styling the DataTable with a Bootstrap Theme might be helpful, and also see my site for more information:
  1. This theme switch component only handles Bootstrap 5 Themes. However, it would be possible to use a customized Bootstrap 5 theme.

  2. For a user default, you might try adding the persistance prop to the RadioItems.

  3. Yes, it’s possible to have the theme change affect all pages. You would just need to include the theme switch component in app.py . See an example GitHub - AnnMarieW/dash-multi-page-app-demos: Minimal examples of multi-page apps using the pages feature in dash>=2.5.1

1 Like