Animations, Layout & Design, Navigation

Navigations: Mobile Menus 2

Navigations: Mobile Menus 2

Navigations: Mobile Menus 2

Benjamin

·

10:45

·

24K views

·

About this lesson

This release introduces three new features designed to improve navigations in Framer. First, we’ve added viewport unit support to the Height property of any layer within a Variant. This helps you design new interactions, such as backdrops that should fade in-and-out. Second, we’re upgrading the Transition property, which now can be added to any layer within your Variants. This gives you precise control over your animations, allowing you to target specific layers to animate, and exclude others. Third, we’re adding support for Transitions to Link Styles, so all of your links can now be animated on Hover. Combined, these features unlock new types of mobile navigations—beyond ones that animate to fill the viewport height. Demo: https://navs-fade.framer.wiki/

🌞 Try Framer for free: https://framer.com

🎉 Follow on Twitter: https://twitter.com/framer

💎 Join Community: https://www.framer.community

0:00yo my name is Benjamin and in this video0:04I'll cover a different way of setting up0:07your mobile navigations0:09specifically we'll cover menus that fade0:12into view on tap instead of menus that0:15animate their height0:17if you haven't yet I recommend watching0:20the previous video covering mobile0:23navigation menus first0:25as we'll be picking up where we left off0:28in that video0:30so in this demo project we currently0:33have an identical setup0:35we have this mobile navigation that0:37animates to the full viewport height and0:40it also collapses back to 64 pixels0:44the links within it are clipped and they0:48fade in and out of view as well0:50so how do we go from this animation into0:54one where we can simply fade the0:56backdrop and the links in and out of0:59view and even add a staggered effect1:02in this release we're adding new1:04features that unlock those navigation1:07patterns as well1:08I'll first resize the phone variant1:12to a matching height of 800 pixels just1:16so we can dissect the changes we're1:18about to make1:21and I'll also bring back this links1:23stack by setting opacity to 1.1:28we don't want any clipping or hide1:30animations1:32so let's set overflow to visible on the1:35phone variant1:37next we'll set transition to instant on1:40both the phone and the phone open1:42variant1:45so at this point we shouldn't have any1:48more clipping or height animations in1:50place1:52this means we also no longer need to1:54have a fill on these two variants1:58instead we'll want to have a separate2:01backdrop layer2:02that always occupies the entirety of the2:05viewport2:06and that can fade in and out of view on2:09tap so I'll simply draw this Frame set2:12it to position absolute dock it to the2:15left top and right sides and then I'll2:18set height to viewport2:20this is the first new feature of this2:23release we recently added the ability to2:27Define viewport units for the Min and2:29Max sizing options and starting today2:33you can also Define viewport units for2:36the height property of any layer within2:39a component which is very useful for2:42backdrops like these2:44[Music]2:45I'll grab the backdrop within the phone2:48open variant as well and set visible to2:51yes2:53and a quick aside this is not2:55overlapping My Links because the links2:58already have a z index value of 2. and3:01the backdrop gets a z index of one by3:05default so we're lucky here it works out3:07of the box if your backdrop happens to3:10overlap your links make sure that your3:13links have a higher Z index value so we3:16have the backdrop layer in place however3:19we know that our variants here have3:22transition set to instant but we want to3:26animate these two layers while keeping3:28the variant switching instant the second3:31new feature we're introducing in this3:34release is the ability to add transition3:37properties to any layer within a3:40component so with both of these3:43backdrops selected I'll head over to the3:46Styles menu and I'll add a transition3:49property and I can give these some nice3:52spring values3:55foreign next we'll do the same thing for3:59the links parent I'll select both and4:03let's give these the same transition4:05values which is stiffness set to 400 and4:10damping set to 50.4:13next let's set opacity back to zero on4:17the links layer and also for the4:20backdrop4:22otherwise nothing would be animating in4:24and out4:27now because both of these layers here4:30are overflowing4:33we have to make sure that the pointer4:34events are set to none otherwise they4:38could be blocking interactions behind4:40them finally we'll select the phone4:43variant4:44and we can resize its height back to the4:48original 64 pixels so let's go back to4:51the home page and give our phone4:53breakpoint a preview4:57as you can see we now have a nice fade5:00in and Fade Out transition of our menu5:03let me reset the background color here5:06so at this point we've essentially5:08reached our goal5:10the menu now fades in and occupies the5:14entirety of the viewport instead of5:16animating the height and clipping its5:19layers but there's more we can do and5:22there is one more new feature I would5:25like to highlight if we hover over these5:28links here you can see that nothing5:29really happens5:31so let's change that and add a nice5:34hover State the third new feature we're5:37adding in this release is transition5:40support for link Styles I'll edit the5:44link style right here and as you can see5:46we now get a nice transition control5:49I'll first update the hover color and5:53then we can add a nice subtle transition5:55as well5:57and if we now go back and give this a5:59preview6:00we now get a nice transition on Hover6:04and this also works in the phone variant6:08it works for any layer that has this6:11link style applied so that is the third6:15feature that we've designed to help6:17improve your navigations6:20finally there are more fun things we6:22could do with the new transition6:24property for example we could use it to6:28add a staggered animation to our links6:31in this menu6:33so first let's select the link stack in6:36the phone variant and add an extra 206:39pixel of left side padding6:43then in the phone open variant I'll6:46select all of these child layers6:49and I'll add the transition property to6:51these as well6:54next we can start adding a unique delay6:57value to each of these transitions7:00so I'll add a 0.05 delay incrementally7:04to each layer here7:08starting from7:100.1 seconds7:12and ending at 0.5 seconds I'll go ahead7:17and speed up this part just a little bit7:19and there we go7:22all links now have a unique delay value7:25so let's go into the preview and see7:27what we have so far so we can see that7:30the delay is working but the links7:32aren't fading in just yet7:35so let's go back into our component7:38select all of these layers within the7:41phone variant and set opacity to zero7:45if we now go back and give this a7:48preview we can see that we have7:50successfully designed a stagger in7:53animation7:55so let's go back and start designing a7:58stagger out animation as well8:01first I'll select the links layer in the8:04phone variant and we can remove the8:07transition and set opacity to one here8:10as we're essentially animating all the8:13child layers we no longer need to8:16animate this parent stack as well and we8:20can also remove it from the linked layer8:23within the phone open variant8:25all right so now it's just these layers8:28themselves plus the backdrop that are8:30animating here so we can do the same8:32thing as before select all of these add8:35a transition set it to Spring8:39and then start adding a unique delay8:41values except here we'll start from the8:44bottom and we'll work our way upwards8:47so again we'll start at 0.18:50then point 15 then 0.2 then point 25 and8:56so on and so forth all the way up to 0.59:01and because this Fade Out or stagger out9:03animation will now be delayed we'll also9:07want to select the backdrop in the phone9:09variant and give this a delay of about9:130.5 as well9:15this makes sure that the backdrop only9:19Fades out once the links are done9:21animating as well so let's go back home9:24and give this another preview9:27and now whenever we close the menu we9:30get this nice stagger out animation as9:33well9:35and we can do a few more things like we9:38could animate this line as well by9:41setting the width to 1 pixel within the9:44phone variant and animating it to fill9:47the available space we can also play9:50with the distribute property like9:52animating it from the center here9:55and if we now go back and give this9:57another preview9:59this gives us a nice subtle line10:02animation as well10:05and that's pretty much it for this video10:08viewport unit support for the height10:11property in components the ability to10:15customize the transition of any layer10:17within a component and the ability to10:20add transitions to a link style all come10:24together to unlock even more navigation10:28patterns in framer thank you so much for10:31watching this video and stay tuned for10:34more Navigation updates coming soon10:39foreign
TeachesStagger

Watch on YouTube ↗

More in this topic

Framer Update: Logo Shaders2:05
Framer Update: Logo Shaders
Framer Update12K views · 1 month ago
8 Framer shortcuts you're probably sleeping on4:19
8 Framer shortcuts you're probably sleeping on
Layout & Design3K views · 2 months ago
Framer Update: Holo Shader1:46
Framer Update: Holo Shader
Framer Update6K views · 2 months ago
Framer Update: Stack Sorting and Bento Grids2:16
Framer Update: Stack Sorting and Bento Grids
Framer Update7K views · 2 months ago
Shader: Chromatic Aberration1:56
Shader: Chromatic Aberration
Framer Update7K views · 2 months ago
Framer Shaders2:28
Framer Shaders
Announcement23K views · 2 months ago
Sharing Vector Sets Across Projects (Vectors Lesson 7)3:41
Sharing Vector Sets Across Projects (Vectors Lesson 7)
Layout & Design1K views · 3 months ago
Connecting Vector Sets to the Framer CMS (Vectors Lesson 6)3:38
Connecting Vector Sets to the Framer CMS (Vectors Lesson 6)
Layout & Design2K views · 3 months ago

Create a free website with Framer, the website builder loved by startups, designers and agencies.