---
source: https://www.jointjs.com/blog/demo-wednesday-text-position-based-on-space-availability
generated: 2026-04-11
format: markdown
---

We've published a new demo: [Text Position Based On Space Availability](https://www.jointjs.com/demos/text-position-based-on-space-availability)

How to **automatically place element labels** based on the **available space** around them? How to enable the user to select the **preferred position** of the label? Take a look at this [CodePen](https://codepen.io/jointjs/pen/eYKBqMb).

See the Pen [JointJS+: Text Position Based On Space Availability](https://codepen.io/jointjs/pen/eYKBqMb) by JointJS ([@jointjs](https://codepen.io/jointjs))
on [CodePen](https://codepen.io).

For more examples of JointJS and JointJS+, see our [CodePen profile](https://codepen.io/jointjs) and our [official documentation](https://resources.jointjs.com/?_ga=2.157485114.162715808.1653039446-2112624975.1653039446).

To see all the awesome demos we've created so far, check out our [Github Discussions](https://github.com/clientIO/joint/discussions?discussions_q=label%3A%22Demo+Wednesday%22).

Every Wednesday we share diagramming tips, interesting features and news in JointJS. Learn with us, get content delivered straight to your inbox and become a real diagramming pro: