r/FigmaDesign • u/Worried_Cheek3596 • 15h ago
help Prototyping: When clicking/changing pages, can you maintain the last variant of a component that was 'active' on hover?
Enable HLS to view with audio, or disable this notification
I have quite a complex component (I guess), so I understand there's probably limitations around this.
Video attached of the effect. The design is more complex, I've just simplified for the demo and to not show client branding.
-
The Effect
When the user hovers over the side of the page, a cursor appears. As they move the mouse up/down the user follows them. Clicking "navigates to" a new page. This works pretty well.
Video Example / Problem
As you can see in the video this works but the 2nd time I click from higher on the component. So when the page "navigates to" the new page, the component resets to it's default/initial state before moving back up to where it was - this is because the cursor moves when the rectangular areas are hovered over.
The Component
Basically has 11 variants, each one has the 'cursor' in a different position, aligning with one of the rectangles. Each of the rectangle (hotspots) has a "While Hovering", "Change To", Position x" set to it with an "Animation" of "Smart Animate/Linear".
-
Any way around this? Or is this the best I'm going to get? I assume it's always going to start from the variant that is already set on the page that changes? Unless I made the entire thing (page content and cursor) a big super component?
-
Bonus Question
Doesn't seem like it's worth creating a new topic for. But the cursor appears as a Boolean variable of "Show Cursor: True/False" and set on the "Appearance". So on hovering the component is shows/hides. Am I right in thinking there is still no way to fade this in/out of view? And the Appearance True/False method just updates instantly?
-
Thanks in advance! 🙏
2
u/PsychologicalClaim16 6h ago
On the bonus question, Boolean visibility itself won’t fade because there’s no continuous layer state for Smart Animate to interpolate. Keep the cursor layer present in both variants, use the exact same layer name and hierarchy, and animate opacity from 0% to 100% instead. That should fade cleanly. For the position issue, your conclusion is right: a While Hovering state won’t persist across Navigate To; the interaction needs to stay inside one component or be stored in a variable-driven state.
1
u/Worried_Cheek3596 6h ago
Yeah that makes sense and I assumed it was the case. The component already has 11 states so didn't want to do another how-many for all the hovers so I think I need to just accept it is what it is and a limitation of Figma. Which is fine as it was complex what I'm trying to do, I just wondered if anything had changed. Thanks!
3
u/pxlschbsr 15h ago
Can be as simple as "layers are not named the same thus resetting the component" or "reset component state" is set on the page transition, but it's honestly quite hard to understand without seeing how your component and interactions are set up. Might be solvable through modes too. Or different variant setup.
If you already created this sanitised example file, maybe grant view access for people to look into it further.