Dcc.dropdown in dark mode

Hi,
I would like to know what is the difference between dcc.dropdown and dbc.select, as I noticed that in dark mode only dbc.select works with a dark background, but not always.
I read on more places this: " You can use a dbc.Select instead of a dcc.Dropdown in some cases ."

Thank you in advance for your comment.

Hi @Ester

The dcc.Dropdown is a custom component that has a lot of features, like the ability to do multi select and search etc.

The dbc.Select is simply an HTML Select element styled with a Bootstrap theme.

The dbc.Select should reflect your Bootstrap theme unless you have some conflicting CSS.

The dcc.Dropdown can be tricky to style because it has CSS bundled with the component. So it will not respond to your Bootstrap theme and needs custom CSS to style it.

You can learn more about styling dcc components with a Bootstrap theme here:

If you would like to customize it further, you can look at the dbc_css stylesheet to find some of the common selectors that you can add to a .css file in your app’s assets folder.

2 Likes

Thank you @AnnMarieW ! I will use next time css.stylesheet. I understand now.

1 Like