> 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/rectangle.md).

# Rectangle

### Introduction

Rectangles can be drawn as an outline, filled in, or both, and supports additional effects such as gradients, drop shadows, and dashed strokes.

<figure><img src="/files/odM2Gl5SgUui6GywCNzM" alt=""><figcaption><p>Rectangle using the default white color</p></figcaption></figure>

{% hint style="info" %}
The fill, gradient, and drop shadow variable categories only appear for version 3 (or later) projects. New projects use version 3 by default.
{% endhint %}

Rectangles support all shape properties. For more information see the [Shape Properties page](/gum/gum-tool/gum-elements/shape-properties.md) and subpages.

<figure><img src="/files/VK0OeuCx65OTxl62Ndxo" alt=""><figcaption><p>Rectangle with stroke, corner radius, fill, gradient, and dropshadow</p></figcaption></figure>


---

# 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 dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.flatredball.com/gum/gum-tool/gum-elements/rectangle.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
