Skip to content
For the complete documentation index, see llms.txt. This page is also available as Markdown.

UIPadding

UIPadding : UIComponent

Overview

A UI component that adds padding along the inner edges of its parent UI element, shrinking inward the area in which the parent UI element's text and child UI elements are placed.

Each padding is specified as a UDim, where Scale is a ratio of the parent UI element's size (based on the width for PaddingLeft and PaddingRight, and the height for PaddingTop and PaddingBottom), and Offset is a value in pixels. Negative values can also be used, and if the sum of two opposing paddings exceeds the size of the parent UI element, the content area on that axis becomes 0.

UIPadding is used by placing it as a child of the UI element to which padding is to be applied. If a UI element has multiple UIPaddings, only the first UIPadding is applied.

Properties

PaddingBottom

UDim

Specifies the padding along the bottom edge of the parent UI element.

Scale is calculated based on the height of the parent UI element. The default is UDim.new(0, 0).

Code Samples

PaddingLeft

UDim

Specifies the padding along the left edge of the parent UI element.

Scale is calculated based on the width of the parent UI element. The default is UDim.new(0, 0).

Code Samples

PaddingRight

UDim

Specifies the padding along the right edge of the parent UI element.

Scale is calculated based on the width of the parent UI element. The default is UDim.new(0, 0).

Code Samples

PaddingTop

UDim

Specifies the padding along the top edge of the parent UI element.

Scale is calculated based on the height of the parent UI element. The default is UDim.new(0, 0).

Code Samples

Methods

Events

Last updated