I have tried have tried
input_class_name per the docs, but none are changing the color. I am attempting to change it to the ‘success’ green.
I have also looked in the Bootstrap docs and do see that the color of this component is able to be changed, but I am not sure how to make this change.
Any help is appreciated!
Good question. Try
Thank you Adam. This did successfully change the color. However, now the switch stays ‘lit’ even when toggling it off, rather than going ‘dim’ when toggling it off. I just looked at the args for this and did not see a separate one that would control this.
you’re right. I couldn’t find a Switch prop that deactivates the class/color when False. A quick work-around is to build this through the callback:
# Import packages
from dash import Dash, dcc, Input, Output, html
import dash_bootstrap_components as dbc
# Initialise the App
app = Dash(__name__, external_stylesheets=[dbc.themes.BOOTSTRAP])
# App Layout
app.layout = dbc.Container(
inputClassName = None
# Run the App
if __name__ == '__main__':