Skip to main content

Hi Figmates


First time asking for help here, so please bare with me if I don’t explain it throughly enough.


I have created a Segmented control and am trying to prototype it so it’s easy to use in our design system.


My challenges are:



  • Text properties doesn’t transfer when changing states

  • Hover and selecting (only one option) is not possible at the same time


It is build and setup like this:

Part(s)

I have a created segmented-control-option, with a boolean to change between variants: inactive and active states. Hover should look the same as active state.

The text on the segmented-control-option has been linked to a text-property (OptionText).

Segmented-control-option


Component:

The Segmented-control component uses 3 instances of the segmented-control-option.

Each of the instances has been linked to seperat boolean variables that control if they are active or not.

Segmented-control


Prototyping:

Each instance is setup using On click → set variable(s) true or false.


Challenges:



  1. I would love to be able to hover over an instance and then select it. But it changes back to inactive when the mouse leaves the instance. Which it probably does because then it’s not hovering anymore.

  2. I would love to take an instance of the Segmented-control change the option texts. But when I select another option and the instance changes state, the text changes to the default text of the options instance.


I feel like I’ve tried everything, search the web, watched all the videos. But it’s like the complexity is just beyond me and above the video tutorials I’ve found.


So Figmates you are my last hope.


Here is a link (hope it works)

Figma – 12 Jul 24

Thx

What I would do: (1) use Mouse Enter instead of While Hovering for the action trigger, that way you will solve the reverting to the initial state issue. (2) You can set 3 variants of the component (one for each segment) and set it as if your mouse enters (mimicking the hover effect) another segment then it auto animates to select that segment (and it will stay that way unless you hover a different one). (3) Regarding the texts, have you tried setting 3 Text properties on the Segmented control? (That way you can change one each Segment/Option N and still reuse all the interactions and links. @Nic77


@Nic77 I proto’ed it for you


<iframe style="border: 1px solid rgba(0, 0, 0, 0.1);" width="800" height="450" src="https://www.figma.com/embed?embed_host=share&url=https%3A%2F%2Fwww.figma.com%2Fproto%2Fo10DhPD6D3HJK1TpgLyCmx%2FTest%3Fpage-id%3D0%253A1%26node-id%3D1-47%26viewport%3D254%252C214%252C0.45%26t%3DLpzSTdvtGItRGF82-1%26scaling%3Dcontain%26content-scaling%3Dresponsive%`26starting`-point-node-id%3D1%253A47" allowfullscreen></iframe>

Reply