Bird
Raised Fist0
Figmabi_tool~10 mins

Connection creation (click, hover) in Figma - Interactive Code Practice

Choose your learning style10 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to create a connection on click in Figma.

Figma
figma.currentPage.selection[0].on('click', () => [1]);
Drag options to blanks, or click blank then click option'
AhoverConnection()
BselectConnection()
CdeleteConnection()
DcreateConnection()
Attempts:
3 left
💡 Hint
Common Mistakes
Using a hover function instead of click.
Trying to delete instead of create.
2fill in blank
medium

Complete the code to show a connection highlight on hover.

Figma
figma.currentPage.selection[0].on('hover', () => [1]);
Drag options to blanks, or click blank then click option'
AremoveHighlight()
BshowHighlight()
CcreateConnection()
DhideConnection()
Attempts:
3 left
💡 Hint
Common Mistakes
Using createConnection on hover instead of highlight.
Using removeHighlight which hides the effect.
3fill in blank
hard

Fix the error in the code to properly create a connection on click.

Figma
figma.currentPage.selection[0].on('click', () => [1]);
Drag options to blanks, or click blank then click option'
AcreateConnection()
BcreateConnection
CcreateConnection();
DcreateConnection =>
Attempts:
3 left
💡 Hint
Common Mistakes
Missing parentheses causes the function not to run.
Adding extra semicolon inside the arrow function body.
4fill in blank
hard

Fill both blanks to create a connection on click and remove highlight on hover end.

Figma
figma.currentPage.selection[0].on('click', () => [1]);
figma.currentPage.selection[0].on('hoverend', () => [2]);
Drag options to blanks, or click blank then click option'
AcreateConnection()
BremoveHighlight()
CshowHighlight()
DdeleteConnection()
Attempts:
3 left
💡 Hint
Common Mistakes
Using showHighlight on hover end instead of removeHighlight.
Deleting connection on hover end instead of removing highlight.
5fill in blank
hard

Fill all three blanks to create a connection on click, show highlight on hover, and remove highlight on hover end.

Figma
figma.currentPage.selection[0].on('click', () => [1]);
figma.currentPage.selection[0].on('hover', () => [2]);
figma.currentPage.selection[0].on('hoverend', () => [3]);
Drag options to blanks, or click blank then click option'
AcreateConnection()
BshowHighlight()
CremoveHighlight()
DdeleteConnection()
Attempts:
3 left
💡 Hint
Common Mistakes
Mixing up showHighlight and removeHighlight functions.
Trying to delete connection on hover events.

Practice

(1/5)
1. What does the On Click interaction in Figma prototypes do?
easy
A. Automatically plays an animation without user input
B. Triggers an action when the user hovers over an element
C. Triggers an action when the user clicks on an element
D. Changes the color of an element permanently

Solution

  1. Step 1: Understand interaction types in Figma

    Figma uses different triggers like 'On Click' and 'While Hovering' to create interactive prototypes.
  2. Step 2: Identify the trigger for 'On Click'

    'On Click' means the action happens when the user clicks on an element, not on hover or automatically.
  3. Final Answer:

    Triggers an action when the user clicks on an element -> Option C
  4. Quick Check:

    On Click = action on click [OK]
Hint: Click means action happens on mouse click, not hover [OK]
Common Mistakes:
  • Confusing 'On Click' with 'While Hovering'
  • Thinking 'On Click' triggers automatically
  • Assuming 'On Click' changes styles permanently
2. Which of the following is the correct way to create a hover interaction in Figma?
easy
A. Select the element, then choose 'While Hovering' and link to a frame
B. Select the element, then choose 'On Click' and link to a frame
C. Select the element, then choose 'After Delay' and link to a frame
D. Select the element, then choose 'On Drag' and link to a frame

Solution

  1. Step 1: Identify interaction triggers for hover

    Hover effects in Figma are created using the 'While Hovering' trigger, not 'On Click' or others.
  2. Step 2: Confirm correct trigger selection

    Choosing 'While Hovering' and linking to a frame sets the hover interaction properly.
  3. Final Answer:

    Select the element, then choose 'While Hovering' and link to a frame -> Option A
  4. Quick Check:

    Hover = While Hovering trigger [OK]
Hint: Hover uses 'While Hovering' trigger, not 'On Click' [OK]
Common Mistakes:
  • Selecting 'On Click' instead of 'While Hovering' for hover
  • Using 'After Delay' which triggers automatically
  • Confusing 'On Drag' with hover
3. Given a prototype where a button has an interaction set to While Hovering that changes the frame to 'Details', what happens when the user moves the mouse away from the button?
medium
A. The prototype stays on the 'Details' frame permanently
B. The prototype crashes due to invalid interaction
C. Nothing happens; the frame does not change
D. The prototype returns to the previous frame automatically

Solution

  1. Step 1: Understand 'While Hovering' behavior

    This interaction triggers only while the mouse is over the element; moving away cancels it.
  2. Step 2: Determine what happens after hover ends

    When the mouse leaves, the prototype returns to the previous frame automatically, reversing the hover effect.
  3. Final Answer:

    The prototype returns to the previous frame automatically -> Option D
  4. Quick Check:

    Hover off = revert frame [OK]
Hint: Hover effects revert when mouse leaves element [OK]
Common Mistakes:
  • Assuming hover changes are permanent
  • Thinking nothing happens after hover ends
  • Believing prototype crashes on hover
4. You set an interaction on a button with 'On Click' to navigate to a frame, but clicking does nothing. What is the most likely cause?
medium
A. The interaction is set to 'While Hovering' instead of 'On Click'
B. The linked frame does not exist or is deleted
C. The prototype is not in Present mode
D. The button is not selected before creating the interaction

Solution

  1. Step 1: Check interaction setup

    If clicking does nothing, verify the linked frame exists and is correctly named.
  2. Step 2: Confirm frame availability

    If the linked frame is missing or deleted, the interaction cannot navigate, causing no response.
  3. Final Answer:

    The linked frame does not exist or is deleted -> Option B
  4. Quick Check:

    Missing frame = no navigation [OK]
Hint: Ensure linked frames exist before linking [OK]
Common Mistakes:
  • Confusing 'While Hovering' with 'On Click'
  • Not entering Present mode to test
  • Not selecting the button before linking
5. You want to create a prototype where hovering over a product image shows details, and clicking the image opens a purchase page. How should you set up the interactions?
hard
A. Set 'While Hovering' to show details overlay, and 'On Click' to navigate to purchase page
B. Set 'On Click' to show details overlay, and 'While Hovering' to navigate to purchase page
C. Set both 'On Click' and 'While Hovering' to navigate to purchase page
D. Set 'While Hovering' to navigate to purchase page, and no 'On Click' interaction

Solution

  1. Step 1: Assign hover interaction for details

    Use 'While Hovering' to show details overlay because hover triggers temporary display.
  2. Step 2: Assign click interaction for purchase

    Use 'On Click' to navigate to the purchase page because click triggers a permanent action.
  3. Final Answer:

    Set 'While Hovering' to show details overlay, and 'On Click' to navigate to purchase page -> Option A
  4. Quick Check:

    Hover = show details, Click = navigate [OK]
Hint: Hover for temporary info, click for permanent navigation [OK]
Common Mistakes:
  • Swapping hover and click actions
  • Using click for temporary hover effects
  • Not setting both interactions properly
Recommended

Ready to prove it?

Pass the test and this pattern moves unknown strong while earning +1 Grip toward your certificate.

10 questions~5 mineasy hard