5

Is it possible to combine a text field with a shape in Sketch whereby the shape will auto expand to accommodate the text length?

enter image description here

1

3 Answers 3

2

Sketch doesn't have this functionality built-in by default, but there are two very similar plug-ins that offer it:

I've been using Dynamic button for quite a while, but recently switched to Compo, as it offers greater control in setting margins (e.g. it's possible to keep an element fixed to a certain side of a component).

2
  • FWIW I just tried both of those plugins on symbols in Sketch 50.2 with no luck. They might work on non-symbols, but that defeats the purpose for me as I want to be able to do things like update the design of a variable height list item from one place.
    – Weston
    Jun 19, 2018 at 17:53
  • @Weston Yes, they only work on non-symbols. I don't know of a way to use symbols for this.
    – Tin Man
    Jun 19, 2018 at 19:53
1
+100

A plugin that's definitely working for symbols in Sketch 50.2 is Paddy. By creating a specially named layer, the plugin will auto-resize it every time the "contents" are resized.

A newer version is being developed that is much more powerful, too

-1

Aside from plugins, the only workaround would be to duplicate the text layer, convert one of them to outlines and hide the other.

This way you still have a backup to change text if you really need to. The outlines will scale, but the hidden text won't.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.