its possible to naviguate in frame with variant componnnet ?

Hello, I’m stuck, I would like to navigate to a frame home using dropdown variant in component, I apply function click in my variant with navigate to home but when I test it doesn’t work, my question is it possible to prototype navigate function in variant of one component in Figma for header in my case or I need to find a simple solution?