Using div click to trigger callback

Yes, you can target the element’s n_clicks property using an Input in a callback – every Dash component has this property:

@app.callback(Output('target', 'children'),[Input('link', 'n_clicks')])

Alternatively, you can also target a click Event produced by your html.A element:

@app.callback(Output('target', 'children'), [], [], [Event('link', 'click')])

1 Like