Layout & Design, Navigation

Navigations: Mobile Menus

Navigations: Mobile Menus

Navigations: Mobile Menus

Benjamin

·

6:28

·

65K views

·

About this lesson

In this release, we’re introducing new features that improve mobile navigations in Framer, empowering you to deliver exceptional user experiences. We’ve recently shipped viewport unit support within components, for sizing properties such as min-height and max-height. This enables you to design expanded navigation states without relying on nesting. Today, we’re adding the overscroll property, which prevents the page from scrolling along with your navigation. We’ve also refreshed the component previewing experience, avoiding height animations being cut-off. Watch the video above to learn more, or remix our demo here: https://navs-mobile.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'm excited to talk about new features0:06we've designed to improve mobile0:08navigations in framer so let's Dive0:11Right In Here we have a simple top bar0:15navigation component and it works nicely0:18on a desktop breakpoint it even scales0:21down nicely to a tablet size but on a0:25phone the links will get cut off0:28so let's double click to edit this0:31component and design a real mobile0:33navigation I've already set up my0:36desktop variant knowing will design a0:39mobile version so let's have a look0:41there is this hidden menu icon next to0:45the logo0:47and it is contained in this shared stack0:50called top and we'll be able to stretch0:52this out on mobile I'll go ahead and0:55hide that again next we have this stack0:57called links that contains all these1:00links horizontally distributed with a 201:03pixel Gap and they all have placeholder1:06links pointing to framer.com this stack1:09also contains a hidden crit that just1:12contains a few images that will1:15resurface on the phone menu and finally1:18we have this tiny one pixel frame that1:21represents the bottom border so let me1:24zoom out and the next step is adding a1:28second variant here in which we'll be1:30able to design our mobile menu I'll1:33rename it to phone and I'll set the1:35width to 390 matching the default phone1:39breakpoints in framer we can set the1:43height to fit content1:45and the direction of this stack to be1:48vertical next let's find that hidden1:51menu icon and bring it back by setting1:54visible to yes1:57and then we'll stretch out this stack by1:59setting width to fill and the distribute2:03property to space between2:06now this is starting to look a little2:08more like a mobile menu2:10let's now do the links as well we'll set2:13the width to fill direction to vertical2:16and align to start2:19Gap to 10 and I'll add some padding as2:23well leaving a bit of extra breathing2:26room at the bottom to ensure our links2:28do not get cut off on mobile Safari2:32I'll also select all of these links and2:35give them a different text style that2:38simply bumps the font size as promised2:41let's bring back our grid as well by2:43setting visible to yes2:45and there we go we've now converted our2:49desktop navigation to a mobile2:51navigation but we're not done just yet2:54as we would like this menu to be2:57collapsed by default and then expand on3:00tap so with the phone variant selected3:02let's add a third variant to this3:06component this one we'll call phone open3:09and this is the one we'll actually use3:11for the expanded state3:13so I'll go ahead and set this menu icon3:16to the close variant and just so you3:20know this is a very simple component3:22that just animates these two lines into3:24an X3:27we would also like our links to actually3:30fade in3:31so I'll go ahead and select the links3:34and set opacity to zero3:37then we'll simply select the phone3:39variant3:40reset the height to fixed and resize it3:44down to 64 pixels just like the initial3:47variant3:50so now this is really starting to come3:52together3:53and as I'm sure you can imagine we can3:55now start animating between these two3:57variants3:58and the trigger of this animation is4:01this menu icon4:03so I can go ahead and zoom out a bit4:05select the menu4:08and I'll hit L and I'll drop the arrow4:11onto the phone open variant and I'll do4:15the same from the phone open variant X4:18icon4:19select it hit L and drop it onto the4:23phone variant so now we can cycle4:26between these two variants on tap4:29all right so far so good now it's time4:33to make this one work really nicely on4:35mobile devices I'll first add a Max4:38height and I'll set it to 100 VH4:42so it can never exceed the height of the4:45viewport of any device you're viewing it4:48on4:49next we'll set overflow to scroll again4:52we're doing this on the entire phone4:54open variant and then I'll add a new4:57property called over scroll and by5:00default it's already set to contain and5:04what this does is ensure that we can5:06freely scroll our mobile menu without5:11actually also scrolling the page behind5:14it making for a much better user5:16experience we've also improved the5:19previewing experience of your5:21interactive components where previously5:24any sort of height animations would get5:26cut off you can now freely preview this5:29right from within the component canvas5:32with our mobile navigation all done all5:35that's left to do is return to the home5:37page5:39and within the phone breakpoint5:42sets this variant to the phone variant5:46and here we can see that the setup is5:49working correctly5:51but even better is testing this on an5:53actual mobile device5:55where we can get a real sense of the5:58scrolling experience6:00viewport support in components the6:03overscore property and the improved6:07previewing experience allow you to6:09design high quality mobile menus6:12directly in framer6:14thank you so much for watching and stay6:17tuned for more Navigation updates coming6:20soon6:25thank you

Watch on YouTube ↗

More in this topic

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: Stack Sorting and Bento Grids2:16
Framer Update: Stack Sorting and Bento Grids
Framer Update7K 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
Animating Vectors in Framer (Vectors Lesson 5)4:25
Animating Vectors in Framer (Vectors Lesson 5)
Layout & Design4K views · 3 months ago
Customizing Vectors with Variables in Framer (Vectors Lesson 4)4:59
Customizing Vectors with Variables in Framer (Vectors Lesson 4)
Layout & Design3K views · 3 months ago
Replace component instances site-wide in Framer1:39
Replace component instances site-wide in Framer
Layout & Design4K views · 4 months ago
Creating and Organizing Vector Sets in Framer (Vectors Lesson 3)6:58
Creating and Organizing Vector Sets in Framer (Vectors Lesson 3)
Layout & Design3K views · 4 months ago

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