Trigger a callback on dbc.Carousel change

Is it possible to trigger a callback when the active item of a dbc.Carousel is changed?

What I’m trying to do is add a link to the images of the carousel, and one way I thought might work is to wrap the whole thing in html.A and, when the active item of the carousel is changed, update the link and the carousel with the new active item. But I’m not sure what I should include as my input for the callback. I’m pretty sure you can do this using something like radio buttons to control the carousel, but I’d prefer to be able to use the internal controls of the carousel, if possible.


Obviously, it should be

active_index ( number ; default 0 ): The current visible slide number.

Hi @stu thank you for trying to help @matt2 .

@matt2 welcome to the community. For future questions, see if you can add code as well. That would make it even easier to help.

1 Like

You’re welcome. But I’d say the key is more about the ability of the posters to ask than whether they posted the code. Maybe you can find more instances to show us which is good and which is not. By this improve their ability to ask questions.