Hide certain components on click

I have a set of components with the class .only-on-checkbox that I want to show only if a checkbox is checked. Should I do this using callbacks? How? Or maybe I should add a simple script to the assets folder?

I think it could be done modifying a parent div of the plots, and adding/removing a css class. Is this possible?

https://dash-bootstrap-components.opensource.faculty.ai/docs/components/fade/

1 Like

Yeah, you can write a callback to update the class name :slight_smile:

Your output would be something like:

Output(‘parent-div-id’, ‘className’)

That was what I was looking for, thank you very much!