How to create a scrollTo to a word inside a Textbox?

2024-01-15_10-44-41

Hi, all. I want to ask if is there a possible way to make a scrollTo event on a specific word/string in a textbox? For links, it’s possible by pasting the link after highlighting the text. I’m also open for any work-arounds that is possible in an Auto-layout.

Thank you!

Hello @Raphael_M

You cannot select a part of a text block to create an interaction. But you have work-arounds

Multiple text block :

Create multiple text block in order to ____ the one you want to interact with


(cons : this won’t work well on a multi-line text)


Absolute invisible element

You can position a rectangle with a 0% opacity and add the trigger on itself


(cons : whenever you change the text, you’ll probably have to reposition the invisible rectangle)

1 Like

Hi, Thanks for your reply.

You’re right with the use of multiple text blocks in an auto-layout wont work well on multiple lines. I’m thinking if is there is a Figma feature like putting a [# + Frame_Name] or something like that in adding links in the create link feature, which apparently doesn’t work or there is something missing on it.
image

If it works like the <a> in HTML, I’m thinking if it works like <a href="[link/#+yourframename">.

Using an invisible element in absolute position will not be a good idea because it’s going to be manually adjusted whenever I change screen sizes after all the text will be in an auto-layout.

Unfortunately, to my knowledge there is no such things in Figma. Maybe some plugins offer it but I don’t know any.