Plotly R opacity by group

Greetings,

I am working on a Shiny App. I am wanting to programatically change the opacity of few points on a plot depending on a coupled event i.e. a click on a different plot. Any suggestions on how I could go about this?

Thanks

Sri