Layout & Design

Adding Links in Framer (Fundamentals Lesson 15)

Adding Links in Framer (Fundamentals Lesson 15)

Adding Links in Framer (Fundamentals Lesson 15)

Joseph

·

10:30

·

65K views

·

About this lesson

At the beginning of this course, we looked at how to add multiple pages to our site. Now it's time to link those pages together and turn them into an experience that a visitor can navigate.

https://www.youtube.com/watch?v=cEamHEJYflI&t=0s Intro

https://www.youtube.com/watch?v=cEamHEJYflI&t=13s Linking navigation buttons to pages

https://www.youtube.com/watch?v=cEamHEJYflI&t=81s Creating and styling link styles

https://www.youtube.com/watch?v=cEamHEJYflI&t=177s Linking to page sections with smooth scroll

https://www.youtube.com/watch?v=cEamHEJYflI&t=286s Linking text ranges

https://www.youtube.com/watch?v=cEamHEJYflI&t=357s Linking buttons to external pages

https://www.youtube.com/watch?v=cEamHEJYflI&t=556s Link conflicts and best practices

https://www.youtube.com/watch?v=cEamHEJYflI&t=606s Wrap up

🌞 Start for free: https://framer.link/yt

📚 Learn more at: https://framer.link/yt-academy

💎 Join the Community: https://framer.link/yt-community

🎉 Follow on X: https://framer.link/yt-x

0:00at the beginning of this course we0:01looked at how to add multiple pages to0:03our site now it's time to link those0:05pages together and turn them into an0:07experience that a visitor can0:10[Music]0:12navigate all right to get us started0:14I've created a little sample website0:16that has a few pages on it that we can0:18actually link to so we'll start with the0:21homepage and we'll start with these0:22navigation buttons in the homepage in0:25fact they're not navigation buttons at0:27all right now they're just regular old0:29text boxes so to turn one of these into0:31a link all we need to do is Select it0:33and then at the very top of the0:35properties panel you'll see link with a0:37little plus sign now you can either0:39click here or as long as you have an0:41element selected and not a range of text0:44you can also just press the letter L on0:46the keyboard and pressing L will add a0:48link and it'll focus the link to field0:51where you can either paste in the URL of0:53an external site or you can start typing0:55the name of one of your own pages so for0:58example we want pricing link to pricing1:01I could just select it from the drop1:02down menu we don't have that many pages1:04on this site but let's say that we did1:07let's say that I wanted to type pricing1:09as soon as I start typing it's going to1:11filter down to show things that match1:13which includes the pricing page itself1:15but because the pricing page also has1:17some sub Pages within it those show up1:20as well if I want to see only the sub1:23pages I can type pricing followed by a1:25slash and that slash actually kind of1:27simplifies this drop down and and1:30doesn't show things that aren't children1:32of the pricing page but since this is1:35the main pricing page I want to link to1:36I'm going to go back and with pricing1:38highlighted I'll just hit return and1:40boom now we are linking to the pricing1:43page you'll notice below there are a1:45couple of settings here we have the new1:47tab option which means do we want this1:49to open in a new browser tab when1:51someone clicks on it when linking to1:53Pages within your own site typically1:55you'd want the answer to be no you don't1:57want to be opening tabs and windows on1:59the visitor computer every time they2:00click on a link so I'm going to leave2:02that set to know and the next property2:05is something called style now style2:07shows up because the layer that I'm2:08linking from here is a text layer and I2:11also want to point out you can highlight2:12a range of text and create a link from2:14that in this case it's an entire text2:17layer that just has one word in it and2:19that's fine too but anytime you're2:20linking from text you're going to get2:22this style property here and when you2:24click on it you get this little modal2:26where you can manage your link Styles so2:29the idea a is that rather than styling2:31each link one at a time and having to2:33redo that work over and over again we2:36instead create what's called a link2:37style and then we choose which link2:39style we want to apply each time we2:41create a new text link so here it's2:43created a default style for us we can2:45either edit this or we can just create a2:47new style here I think what I'm going to2:50do here is create a new style because I2:52like this blue type of hyperlink I like2:54that within the context of a paragraph2:56but for our navbar I would like to do2:59something a little bit different I kind3:00of want it to look more the way it did3:02before I added this link with the dark3:04text so I'm going to click new style and3:07then here link to I can rightclick on3:09this and choose to rename it and I can3:11name this nav link so that I don't get3:14confused later and then when I Mouse3:15over it I can choose the edit button and3:18here this is what link styles are all3:19about we're going to choose a style for3:22the default state of the link the link3:24when it's just sitting there not doing3:25anything then we're going to choose a3:27style for how the link appears when the3:29visitor mouses their cursor over it3:31which is called hover and then we have a3:33style called current which is for when3:35the link links to the page that we're3:37currently looking at so that we can let3:40visitors know hey this is where you are3:42right now so for this I'm actually going3:45to change the default color I'm going to3:47switch this to the 666 hex code that it3:50was before and I'm going to go back and3:53let's leave the hover color on Blue so3:57that we can actually see something3:58happening when we hover over it4:00another thing that we can do because by4:01default this switch from the default4:03State over to the hover state is going4:05to be instantaneous we can also click4:07here to add a transition and have it4:09kind of ease in and out and that has its4:12own little dialogue here where we can4:13play with the timing and the delay of4:15things um I'm actually going to bring4:17the time down a little bit 0. 2 or34:20seconds keeps it nice and snappy but4:22because it's animated it's got a little4:24extra smoothness to it I'm going to go4:26back here and for the current color this4:28is really Deb atable and subjective but4:31I'm going to set this to the color we4:33had before our default color and I'm4:36going to go back and I'm going to leave4:38the decoration set to underline so even4:40if we decide not to change the color we4:43can still use an underline as some sort4:45of signifier that this link is special4:49cool and all the choices I've made here4:51aren't just for this link but for this4:53link style which I can now go apply to4:56the other links now there are a couple4:58of items in my Navar that actually5:00aren't meant to link to other pages of5:02this site I want them to link to5:04corresponding sections that are on this5:07current page that are on the homepage if5:09I scroll down we have a little feature5:11section here and if I scroll even5:13further we have what our users say and5:15other words testimonials so back up at5:18the top in my nav bar sure enough I have5:20an item here for features and I have an5:22item here for testimonials to link to a5:24section of a web page we just have one5:27little bit of setup to do we've got a5:29find the frame that represents the5:31section or at least that represents the5:33top of the section here I do have a5:36frame for my entire feature section and5:39with that selected I'm going to go down5:41to the bottom of the properties panel5:42and I'm going to add a scroll section we5:45can give this scroll section A name I'm5:47going to leave the name at features and5:49then we also have the option to create5:51an offset and again when you link to a5:54scroll section the top of that section5:56is going to align with the top of the5:58browser it's going to slide up and it's6:00going to stop when it reaches the top of6:01the browser so using offset y we can say6:05stop a little bit lower or stop a little6:07bit higher so that way we can compensate6:09for design elements that are getting cut6:11off or perhaps you have a fixed nav bar6:13and you want this to scoot down out of6:15the way of that nav bar I'm going to6:17leave my offset Y at zero because we6:20don't have anything like that going on6:22and now when I select features I can6:25create a link that links to home that's6:28the page that we're currently on that's6:29the page where this section exists and6:32once I've selected that page I now get6:34an option called section and from the6:37section drop down I can choose features6:40now when you link to a section you get6:42an extra property here called scroll and6:44that lets us choose between jumping6:46instantly to the section or instead6:49having a smooth scroll effect that6:51Scrolls the viewer down past all the6:54things that are in between and stops at6:56the section let me fix my link style6:59here real quick and now let's take a7:01look at how that works in the preview7:03window so I hover over features it turns7:06blue it gets underlined which is exactly7:08what was dictated in our link style and7:10when I click boom there's that smooth7:11scroll effect and the top of the section7:13stops when it reaches the top of the7:15browser here pretty cool so all these7:18links so far have been applied to entire7:20text layers but like I mentioned earlier7:22you can also highlight just a range of7:25text within a paragraph and you can add7:28a link to that as well so by clicking on7:30link here and in this case you don't7:32want to use the keyboard shortcut if I7:33press the letter L it's going to replace7:35the highlighted text with the letter L7:38don't want to do that so in this case I7:39definitely want to click to add the link7:41here on the properties panel now let's7:44say we want this to link to a particular7:46blog post if I type blog especially if I7:49type blog slash which is where my posts7:52live we see here something called a slug7:55this is what you'll see if you're7:56linking to a CMS entry if you're linking7:59to a page that's created by the CMS so8:03if we choose slug here we can then8:04choose in the next dropdown which8:07specific blog post we want this to link8:09to so I'll choose styling elements here8:11for example cool so again everything8:15that we've done so far has been with8:16text let's take a look at adding a link8:19to something that isn't a text layer I'm8:21going to click on get started here now8:24the default selection mechanics mean8:26that when I click in framer I'm going to8:27get the most deeply nested layer under8:29my cursor so in this case I actually8:31grabed the text layer but what I'd8:33really like is that whole button frame8:35so what I'm going to do is press the8:37Escape key to go up one level in the8:38hierarchy and now that I've got the8:40whole button selected I'll click to add8:43my link now one thing we haven't done8:45here yet is linked to an external page8:47so I'll do that I'll just type8:50https colon slf framer docomo go and8:56copy this from the browser so I don't8:57have to type quite so much or if I'm not8:59sure if it's an https or if it's HTTP9:03it's always safest to just copy and9:05paste from a page that you've pulled up9:07in the browser cuz you know if you9:08pulled it up in your browser that it's9:10correct and when I hit return to lock9:12that in again we get the option to open9:14in a new tab or not the last thing I9:17want to point out is that if we look9:18over on the layers panel there is a9:20little tiny link icon that shows which9:23layers have links applied to them so9:25here you can see it's the button that9:28has the link it's not the Tex layer9:29within it and another thing I want to9:31point out is that you can't have an9:32element with a link applied to it within9:35another element that has a link applied9:36to it that's a conflict because where's9:38it going to take you when you click on9:39the link even if they link to the same9:41place it's still technically a conflict9:44so if I try to add a link to the child9:47of this Frame that already has a link we9:49get a little message that says hey the9:51parent already has a link applied to it9:53so we can decide whether or not we want9:55to leave it alone or if we want to go to9:57the parent and remove the parent link9:59and instead put it on the child layer10:01but that is completely up to us and10:04that's it now you know how to add links10:06how to style them how to link to other10:08pages of your site how to link to10:09external Pages as well as how to get10:12that smooth scrolling effect to link to10:14different sections of your site that's10:16it for this one I'll see you in the next10:18one
TeachesLinks

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.