dbc.Switch make larger

Hi,

I am making a dbc.Switch and I am struggling to find a way to make the switch larger. Other dbc components have the “size” input (in this image the buttons are md). Ive tried to mess with the CSS and so far have not been able to figure it out. Image here for reference. Thanks for any help!
Screenshot 2023-11-15 at 1.47.26 PM

Hi @cdolfi

You can adjust the size of the switch using the font size. So either the built-in CSS class names "fs-# where # is a number from 1 to 6 corresponding to the size of a heading.

dbc.Switch(className="fs-2")

or use style

dbc.Switch(style={"fontSize":50})
1 Like

Hey @cdolfi,

it is somehow correlated with the fontsize prop. Hence, try to play with it:

style={‘fontSize’:15},

2 Likes

this worked thank you sm!

2 Likes