1.1 Tap Toggle

Level 1

10 Steps

What you are building

A simple toggle interaction where a switch moves between off and on when tapped.


Tap once to turn it on.
Tap again to turn it off.


This is one of the most common interaction patterns in iOS, and a perfect place to start learning ProtoPie.

How to think about it

A tap toggle is binary.


On or off.
Active or inactive.


There is no in between. The only goal is clarity. The user should always know which state they are in.


You can think of the toggle state as living in the position of the handle. Where the handle rests is the truth.

Recreate this in ProtoPie

Start by creating two layers:

  • Toggle: the base track

  • Handle: the circular knob inside the toggle


The Handle will move.
The Toggle will change color.

This is a screenshot of layers in ProtoPie.
This is a screenshot of layers in ProtoPie.
This is a screenshot of layers in ProtoPie.
This is a screenshot of layers in ProtoPie.

Step 1: Add a tap trigger

Select the Toggle layer.

Add a Tap trigger. This is the only input for the interaction.

This is a screenshot of Step 1: Add a tap trigger.
This is a screenshot of Step 1: Add a tap trigger.
This is a screenshot of Step 1: Add a tap trigger.
This is a screenshot of Step 1: Add a tap trigger.

Step 2: Create a condition (toggle on)

Add a Condition to the tap trigger.

Set the condition based on the X position of the Handle.


This reads as:
When Handle X is 24, then do the following.


This means the toggle is currently off.

This is a screenshot of Step 2: Create a condition (toggle on).
This is a screenshot of Step 2: Create a condition (toggle on).
This is a screenshot of Step 2: Create a condition (toggle on).
This is a screenshot of Step 2: Create a condition (toggle on).

Step 3: Move the handle to ON

Add a Move response.

  • Target: Handle

  • Set X position to 56


This slides the handle to the on position.

Play with easing and duration until it feels right. Keep it quick and confident.

This is a screenshot of Step 3: Move the handle to ON.
This is a screenshot of Step 3: Move the handle to ON.
This is a screenshot of Step 3: Move the handle to ON.
This is a screenshot of Step 3: Move the handle to ON.

Step 4: Change the toggle color

Add a Color response.

  • Target: Toggle

  • Set the fill to your active color


This visually confirms the on state.

This is a screenshot of Step 4: Change the toggle color.
This is a screenshot of Step 4: Change the toggle color.
This is a screenshot of Step 4: Change the toggle color.
This is a screenshot of Step 4: Change the toggle color.

Step 5: Add haptic feedback

Add a Vibrate response.

Keep it subtle. This is confirmation, not celebration.

This is a screenshot of Step 5: Add haptic feedback.
This is a screenshot of Step 5: Add haptic feedback.
This is a screenshot of Step 5: Add haptic feedback.
This is a screenshot of Step 5: Add haptic feedback.

Step 6: Create a condition (toggle off)

Add another Condition to the same tap trigger.

Set it again based on the X position of the Handle.


This reads as:
When Handle X is 56, then do the following.


This means the toggle is currently on.

This is a screenshot of Step 6: Create a condition (toggle off).
This is a screenshot of Step 6: Create a condition (toggle off).
This is a screenshot of Step 6: Create a condition (toggle off).
This is a screenshot of Step 6: Create a condition (toggle off).

Step 7: Move the handle back to OFF

Add a Move response.

  • Target: Handle

  • Set X position back to 24


Use the same easing and duration as before for consistency.

This is a screenshot of Step 7: Move the handle back to OFF.
This is a screenshot of Step 7: Move the handle back to OFF.
This is a screenshot of Step 7: Move the handle back to OFF.
This is a screenshot of Step 7: Move the handle back to OFF.

Step 8: Reset the toggle color

Add a Color response.

  • Target: Toggle

  • Set the fill back to the default color


This restores the off state visually.

This is a screenshot of Step 8: Reset the toggle color.
This is a screenshot of Step 8: Reset the toggle color.
This is a screenshot of Step 8: Reset the toggle color.
This is a screenshot of Step 8: Reset the toggle color.

Step 9: Add haptic feedback

Add another Vibrate response.

Use the same haptic style as before. Consistency matters more than variety.

This is a screenshot of Step 9: Add haptic feedback.
This is a screenshot of Step 9: Add haptic feedback.
This is a screenshot of Step 9: Add haptic feedback.
This is a screenshot of Step 9: Add haptic feedback.

Step 10: Preview and test

Play the prototype and tap repeatedly.

Check for:

  • Clear on and off states

  • Smooth handle movement

  • Immediate visual and haptic feedback


If it feels obvious, you nailed it.

Try this next

  • Add tap support directly on the Handle

  • Animate the background fill while dragging

  • Refactor this using a variable instead of X position

Up next

Button press feedback. Separating touch down and touch up to make buttons feel physical.

This is a background image of 1.2 Button Press Feedback.

Button Press Feedback

Button Press Feedback

1.2