Hi All,
I was wondering if it is possible to create a Symbol - Text + Underline (Underline is a shape with 1Px height) - where the underline is growing with the length of the text. (if e.g. I override the text with a longer version)
Thanks, Mike
Hi All,
I was wondering if it is possible to create a Symbol - Text + Underline (Underline is a shape with 1Px height) - where the underline is growing with the length of the text. (if e.g. I override the text with a longer version)
Thanks, Mike
Hi @Mike and welcome!
Yes, you can make this with Smart Layout very trivially. Make sure your Symbol has Smart Layout set along the direction of the text (horizontal), and you’re good to go. See an example here:
Thanks a lot Paul! For some reason it doesnt work, the underline doesnt grow with the textlength. Do I have to set some parameters to the underline ?
Ah I think I figured it out: I set “Pin object to all edges on resize”. That did the job Thanks again for your quick reply!
In my video I did not have any pinning set. Pinning applies when you resize the symbol manually, not when it resizes due to Smart Layout as the content changes, and is unnecessary on the edges where the object is already at the edge of the symbol, which seems to be the case here for the underline, on the left and right sides at least.
Edit: correction, pinning may apply when a Symbol resizes due to Smart Layout.
Is it obligatory that the underline is from artboard edge to edge? This might have been the problem as the underline wasnt stretched from edge to edge…
you were right, the underline wasnt stretched from edge 2 edge THX!
No, it is not. But in that case, you want to apply pinning: