Search code examples
sketch-3

how to make text layer auto adjust width on sketch


I create a text layer, by default its width is just response to content, but now, I resize its width, or the group it belongs, then its width will grow like below.

enter image description here

For now, I have to reduce its width manually.

How can I make it reduce its width to response its actual content width automatically, or any plugin can help me?


Solution

  • From the Sketch documentation:

    Auto vs Fixed

    The width property (under Alignment) can be set to either Auto or Fixed. When it is set to Auto, the text box’s width will expand as wide as possible to fit the text you entered. When it is set to Fixed, it’ll wrap the text to the width set in the layer properties and place your text onto a new line instead.

    Screenshot of menu with width options for a text layer

    (Emphasis mine)