Pop-Up
In the first part of this tutorial, you will learn how to create a cookie consent pop-up. Then, you will learn how to make it show when the page is scrolled to a specified position. Finally, we will show you how to create a pop-up that slides in from the side of the screen.
→ Download a ready .uxp file for this tutorial.
- Add a Box on the canvas from the left-side toolbar or by pressing the
"B"
key. - Now, use the
Alt
"I"
shortcut to add an Icon. - Go to the Icons section in the Properties panel and change the default cog into an X.
- Add two Buttons from the Forms section in the left-side toolbar. You can also use the
Alt
"B"
shortcut. - Group all elements together using the
Ctrl
"G"
shortcut and name the group Cookie banner.
Adding Interactions
- Select the X icon and go to the top of the Properties panel to add an interaction.
- Leave the Trigger set to Click (Tap).
- In the Action section, choose Hide.
- Below, in Element select the Cookie banner.
- As the Animation, choose Fade.
- In Animation settings, set the Duration to 150ms.
- Click Add.
Paste the Interactions to Buttons
- Right-click on the X icon to open the context menu and choose Copy interaction.
- Paste the interaction onto each button separately. From the context menu, choose Paste and then Paste Interactions.
- Preview your design.
On-Scroll Pop up
If you want the pop-up to show up when the window is scrolled to a certain position, you first need to set it to a Fixed position by clicking the Pin icon in the Properties panel, hide it with the eye icon and then add an interaction.
Adding Interactions
- Add an interaction on the canvas by clicking the + icon in at the top of the Properties panel.
- As the Trigger choose Scroll.
- In the Scrolled to, section type in the position at which you want to the pop-up to show up.
- As the Action, choose Show.
- Under Element, choose your pop-up.
- Select the Fade effect as the Animation.
- Click Add and preview your prototype.
Slide In Pop-up
Create a pop up with an Email input and a horizontal arrow Icon that will send the entered address.
Make the Pop-up Slide in
- Select the pop-up and move it outside of the canvas by using math in the x-axis field .i.e
+650
. - Then, go the Properties Panel to add an Interaction.
- As the Trigger, choose Page Load.
- In the Action, section choose More and select Move by.
- Under Element choose your pop up.
- In the Move by section you will need to subtract the value you added in Step 1 in the x-axis value .i.e.
-650
. - In the Delay field, type in
2000
and click Add.
Make the Pop-up Slide out
- Select the horizontal arrow Icon and add another Interaction.
- As the Trigger, choose Click(Tap).
- In the Action, section choose More and select Move by.
- Under Element choose your pop up.
- In the Move by section, you will need to add the value on the x-axis to make the pop-up slide out of the canvas.
- In the Duration field, type in
1000
and click Add. - Preview your prototype.