> For the complete documentation index, see [llms.txt](https://docs.flatredball.com/gum/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.flatredball.com/gum/gum-tool/gum-elements/general-properties/x-origin.md).

# X Origin

## Introduction

The `X Origin` variable controls the point which an object is positioned by. By default the `X Origin` is `Left`. `X Origin` is shown visually as a white "X" in the editor.

<figure><img src="https://2695663588-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M_fzQmxQ1VeUFHcoo2c%2Fuploads%2Fgit-blob-6de8a1f14f66bf0ca5a411ab9a8450c6742b3411%2FXOriginX.png?alt=media" alt=""><figcaption><p>ColoredRectangle with an <code>X Origin</code> of <code>Left</code></p></figcaption></figure>

## Left

The following image shows a [ColoredRectangle](/gum/gum-tool/gum-elements/coloredrectangle.md) with its `X Origin` set to `Left`:

![Colored Rectangle with X Origin set to Left](https://2695663588-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M_fzQmxQ1VeUFHcoo2c%2Fuploads%2Fgit-blob-e6d8ded980ca3a749ce7daa3fbb7f0686d605c4a%2F08_06%2018%2029.png?alt=media)

## Center

The following image shows a ColoredRectangle with its `X Origin` set to `Center`:

![ColoredRectangle with X Origin set to Center](https://2695663588-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M_fzQmxQ1VeUFHcoo2c%2Fuploads%2Fgit-blob-78c6ce0286ce6e63408d1536e65b914584a21bf2%2F08_06%2019%2028.png?alt=media)

## Right

The following image shows a ColoredRectangle with its `X Origin` set to `Right`:

![ColoredRectangle with its X Origin set to Right](https://2695663588-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M_fzQmxQ1VeUFHcoo2c%2Fuploads%2Fgit-blob-41b227c4969c28da03c55be9ce389967f02de10b%2F08_06%2020%2036.png?alt=media)

## X Origin in a Left to Right Stack

A child in a [Left to Right Stack](/gum/gum-tool/gum-elements/container/children-layout.md#left-to-right-stack) which is not the first child ignores its `X Origin`, and the stack positions it as if its `X Origin` were `Left`. This keeps it from overlapping its previous sibling. The first child in the stack uses its `X Origin` normally, and `X Origin` works normally for every child in a `Top to Bottom Stack`.

{% hint style="warning" %}
**Breaking change in November 2026:** Before this version, `X Origin` applied to every child in a `Left to Right Stack`, so a `Center` or `Right` origin moved a child back over its previous sibling. Available in November 2026, or now if building Gum from source. For more information see [Migrating to 2026 November](/gum/gum-tool/upgrading/migrating-to-2026-november.md).
{% endhint %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.flatredball.com/gum/gum-tool/gum-elements/general-properties/x-origin.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
