Layout & Design

Adding Inline Links as Overrides in Framer

Adding Inline Links as Overrides in Framer

Adding Inline Links as Overrides in Framer

Justin

·

4:27

·

3.2K views

·

About this lesson

Learn how to add inline links inside Framer components using overrides and formatted text. We’ll cover when link overrides work, why they break for text, and how to style and manage inline links inside components like Accordions.

Remix Link: https://framer.com/remix/5yTWbeHGxP7CirdXYb9W

https://www.youtube.com/watch?v=4Dclbf3yY7M&t=0s Introduction

https://www.youtube.com/watch?v=4Dclbf3yY7M&t=29s Adding Links as Overrides

https://www.youtube.com/watch?v=4Dclbf3yY7M&t=80s Links Inside Text Blocks

https://www.youtube.com/watch?v=4Dclbf3yY7M&t=98s The Anatomy of the Accordion Component

https://www.youtube.com/watch?v=4Dclbf3yY7M&t=154s Adding Inline Links

https://www.youtube.com/watch?v=4Dclbf3yY7M&t=209s Updating Link Styles

https://www.youtube.com/watch?v=4Dclbf3yY7M&t=237s Adding More Formatted Text Styles

https://www.youtube.com/watch?v=4Dclbf3yY7M&t=244s Wrap Up

Sign up: https://framer.link/yt

Follow: https://framer.link/yt-x

Learn: https://framer.link/yt-academy

0:00Link overrides in Framer let us turn0:02instances a button or card components0:04into their own [music] unique link0:06elements. But when we need to add a link0:08override somewhere within [music] a0:10single block of text, things work a bit0:13differently. So in this video, we'll0:15cover two things. How to create [music]0:17a basic link override and how formatted0:20text variables let us override blocks of0:22text [music] that include inline links.0:28First, let's quickly walk through how to0:30set up a standard link override. Here,0:33I've created a simple button component0:36that I want to reuse throughout my0:37design, but I also want to be able to0:40change the link wherever this button is0:42used. To do that, I'll select the0:45primary variant, head over to the link0:47properties, and click link to. From0:50there, I'll choose create variable,0:53which lets us assign different links to0:55each instance of the component. So now,0:58if we go back to the canvas, we'll1:01notice that each instance has its own1:03link property in the properties panel.1:06This approach works really well for1:08buttons where the entire element should1:10be clickable, but because it applies a1:12single link to the entire element, it1:15doesn't work if we want only part of the1:17block of text to link somewhere else.1:20So, for elements like this accordion1:22that expands to reveal a whole sentence1:24or paragraph, I may want to add a link1:27to specific words or strings of text.1:30This also applies to things like help1:33documentation, legal copy, and other1:36CMS-driven content. And before we go any1:39further, let's quickly take a look at1:41how this accordion component is put1:42together.1:44As we can see in the layers panel, each1:46row in the accordion is made up of the1:49same question component reused multiple1:51times. And when I open up the question1:54component, we can see it has two1:56variants, open and closed, which control2:00whether the answer content is visible or2:02not. Now, if we head back to the2:04accordion level, we'll see that the main2:07component is handling which question is2:09open and which ones are closed. It uses2:13variants to switch between states. So2:15when one question is interacted with,2:17the correct question component toggles2:19to its open variant while the others2:22remain closed. This setup gives us a2:24clean reusable structure. But right now2:27the answer content inside each question2:30is still just plain text, which means we2:32can't add inline links yet. So we'll2:34need to update the question component2:36itself to support these types of links.2:39To do that, I'll doubleclick any of the2:42question components to open it up. From2:44here, I'll select the text within my2:46answer stack and head over to the text2:48properties. Click on content, then2:51create variable, and select formatted2:54text. Choosing formatted text gives us2:57support for rich content, meaning we can2:59add links to individual words or phrases3:02inside a block of text, something a3:04plain text field just can't do. With3:07that set, we'll head back to the main3:08accordion component and select one of3:10the question instances. Now, if we take3:13a look at the properties panel, we'll3:15notice that the answer field now3:16includes an edit content button where we3:19can add our answer, highlight any word3:21or phrase, and use the link icon to add3:24a link to just that portion of the text.3:28And after adding a link, we can3:30fine-tune how it looks by editing the3:32default link style within the assets3:34panel. Or if we double click back into3:37the question component, we can access3:39the link style from the text properties.3:41From here, we can change the color, add3:44a text decoration, define hover or3:47current states, and more. Keep in mind3:50that this style will be shared by any3:52links we add inside the answer variable,3:54which keeps all of our links looking3:56consistent. We can also add more styles3:59of formatted text from here by simply4:01clicking on the plus icon next to our4:03text properties. And that's it. Now you4:06know that when a link needs to live4:08inside a block of text, [music]4:09formatted text is the right tool for the4:12job. This approach keeps your components4:14flexible, clean, and scalable. Thanks4:17for watching, and as always, I'll see4:19you [music] in the next video.

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.