---
source: https://www.jointjs.com/demos/text-position-based-on-space-availability
github: https://raw.githubusercontent.com/clientIO/joint-demos/main/text-position-based-on-space-availability/README.md
generated: 2026-04-16
format: markdown
---

# JointJS+: Text Position Based on Space Availability <a href="https://www.jointjs.com/jointjs-plus"><img src="../jointjs-plus-badge.svg" alt="JointJS+" width="123" align="right" /></a>

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? Check out the demo below to find out.

This demo is also available online at [jointjs.com](https://jointjs.com/demos/text-position-based-on-space-availability).

## Available Versions

- [JavaScript](./js/)

## Screenshot

![screenshot](./screenshot.png)
