[Interactions] Reset element status when clicked outsite

Hi there!

I’m trying to create a navbar with soft micro-interactions.
The idea is to have a line expanding when the item in the navbar is selected and minimising when the user clicks on a different one.

Not sure if I can add some kinda of logic like:
toggle this if clicked and minimise all the other active if any.

I’m unsure if this is feasible with just the interaction or if I need to add some custom code.

Thank you!