Taking the example from https://dash.plot.ly/dash-core-components/checklist, I am looking for a way to highlight New York (not including City) by coloring the background yellow.
If I code in html directly, I would use a span
tag, but I am not sure how to it the Dash way. Here, I also included the source code from the above url. I tried replacing the label string with
'<span style="background-color:yellow">New York</span> City'
but it doesn't work.
from dcc.Checklist(
options=[
{'label': 'New York City', 'value': 'NYC'},
{'label': 'Montréal', 'value': 'MTL'},
{'label': 'San Francisco', 'value': 'SF'}
],
values=['MTL', 'SF']
)