Skip to main content
Question

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


Raphael_M

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!

3 replies

Haroll
  • Active Member
  • 273 replies
  • January 15, 2024

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)


Raphael_M
  • Author
  • Active Member
  • 328 replies
  • January 16, 2024

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.


Haroll
  • Active Member
  • 273 replies
  • January 16, 2024

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


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings