Text at the center of a rectangle in Inkscape

I am using Inkscape to label a diagram. In the attached image I have shown how I would like to label:

enter image description here

In Inkscape is there a way to write a text inside a rectangle such that it is always at the center of the rectangle?


  1. Click on the page with the text tool, and type some text

  2. Draw a rectangle around it

  3. Select both, and do Text > Flow into Frame

  4. Highlight all the text with the Text tool, and click the Align Centre button along the top.

  5. Using the Select and Transform tool (F1)*, reposition the text so that it’s centred.

That’s it really. You can type new text inside and it will be centred. You can group it, copy and paste more copies, and edit the text. It should stay centred in the middle. You can also resize the rectangle, if you need to fit more text in. Even mutli line text will work. If you don’t want to scale the stroke of the rectangle when you are resizing it, go into Edit > Preferences > Behaviour > Transforms, and deselect the “Scale stroke width” option

enter image description here

*Edit: In Inkscape 1.0.x the shortcut key is now s

Source : Link , Question Author : Aim , Answer Author : Billy Kerr

Leave a Comment