Black Lives Matter. Please consider donating to Black Girls Code today.

[Basic question] How to get check value from dcc.Input(type='checkbox')

Hello everyone,

I am using dcc.Input() with type=‘checkbox’ and I would like to do a callback when it’s checked or unchecked. The issue I am having is that I am not able to find how to get this value.

I found that if I would like to check by defeault, I could do something like that in HTML:

<input name=name id=id type=checkbox checked=checked

Is there a way to get the checked value, use it in a callback and modify it if we want?

Apologize if this is an easy question, but I have been stuck on this for way too long.


Copy of another question. Please ignore my post. Thanks

In general, try dcc.Checklist rather than dcc.Input(type='checkbox') - see

1 Like

I see the property options with disabled as one of the key.
How can i check on callback if the checkbox is marked as checked or not.
I am able to fetch label and value.