Creating complex interactions with interactive components — Input Field

Fayas fs
Timeless
Published in
4 min readMay 6, 2022

--

Let’s learn how to create an input field interaction in Figma using interactive components.

Cover Image

The input field is a popular and widely used component in the design. All inputs from the user are taken in this component. There might be more input fields if you’re designing an onboarding flow.
So creating a manual prototype for all the inputs is merely impossible. With Figma’s interactive component feature, we can create prototypes for all the input fields in design by connecting the variants.

New to interactive components? The basics are here.

Step 1: Create an input field component for all the states. Like, default, hover, etc. Combine all the different input field states into variants.

Input Variants

Things to know about the prototype:

  • A trigger can be a tap action, on drag, hovering, pressing, etc. You can select the type of trigger you need for your prototype based on your preference. Here, you can choose hover as a trigger for the button.
  • An action can be how the hotspot takes the prototype to its destination. Here, select change as the action.
  • The animation will be how the prototype will look from frame to frame.

Step 2: Now connect the variants to get a complete cycle of button interaction. From default, hover to active.

Connect default to hover state and choose the following properties.

  • Trigger as “hover.”
  • Action will be “change to.” Changing default component to hover component.
  • The animation will be a “smart animate.”

Step 2: Similarly, connect hover to the active state and choose the following properties.

  • Trigger as “on tap.”
  • Action will be “change to.” Changing hover component to active component.
  • The animation will be a “smart animate.”

Step 3: This step has been made to get the blinking cursor animation when the input is active. Connect two active states where one is with a visible cursor and another is without a cursor.

  • We have to trigger this interaction “after delay” at the appropriate time.
  • Action will be “change to.”
  • The animation will be a “smart animate.”

Now connect back the connection with the same property as above.

Step 4: Let’s also connect the default to the focus input component.

  • We must trigger this interaction when the “tab” key clicks on the keyboard.
  • Action will be “change to.”
  • The animation will be a “smart animate.”

Let’s connect back the focus to default state input since the focus button should be backed to its default style when the ESC key is clicked.

  • It can be triggered by clicking “ESC” on the keyboard.
  • Action will be “change to.”
  • The animation will be a “smart animate.”

Step 5: Let’s connect the active state to the filled state. In Figma, we can achieve this by triggering the animation when a key is clicked.
I’ve chosen “A” for this. It's up to you to pick a key.

Since we have two active states, we can connect the other one.

Similarly, we can connect the focus state to the filled state.

You can get the complete interaction cycle of an input component.

I hope you get to build the prototype with interactive components. To learn more about components, design systems, and Figma as a tool, check this list of blogs.

--

--