> For the complete documentation index, see [llms.txt](https://docs.overdare.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.overdare.com/development/api-reference/classes/uisizeconstraint.md).

# UISizeConstraint

UISizeConstraint : `UIConstraint`

## Overview

A constraint that limits the final size of its parent UI element to stay between a specified minimum size and maximum size.

If the size determined by Size, AutomaticSize, layout distribution, and so on falls outside the range, it is adjusted to fit within the range of MinSize and MaxSize. If MinSize is set larger than MaxSize, MinSize takes precedence.

UISizeConstraint is used by placing it as a child of the UI element whose size is to be limited. If a UI element has multiple UISizeConstraints, only the first UISizeConstraint is applied.

## Properties

### MaxSize

`Vector2`

Specifies the maximum size the parent UI element can have, in pixels.

X is the maximum width, and Y is the maximum height. The default is a very large value that effectively imposes no limit.

#### Code Samples

### MinSize

`Vector2`

Specifies the minimum size the parent UI element can have, in pixels.

X is the minimum width, and Y is the minimum height. If the range conflicts with MaxSize, MinSize takes precedence. The default is `Vector2.new(0, 0)`.

#### Code Samples

## Methods

## Events
