Source: Roblox Creator Hub · CC BY 4.0 · View source · Code samples: MIT Imported 2026-10-03. Formatting adapted for this site.
UIPageLayout
Inherits from: UIGridStyleLayout → UILayout → UIComponent → UIBase → Instance → Object
Creates a paged viewing window, like the home screen of a mobile device. You can use a UIPageLayout by parenting it to a GuiObject. The UIPageLayout will then apply itself to all of its GuiObject siblings.
Inherits from: UIGridStyleLayout
Memory category: Instances
Properties
| Name | Type / Returns | Description |
|---|---|---|
| UIPageLayout.Animated | boolean | Whether or not to animate transitions between pages. |
| UIPageLayout.Circular | boolean | Whether or not the page layout wraps around at the ends. |
| UIPageLayout.CurrentPage | GuiObject | The page that is either currently being displayed or is the target of the current animation. |
| UIPageLayout.EasingDirection | EasingDirection | The easing direction to use when performing an animation. |
| UIPageLayout.EasingStyle | EasingStyle | The easing style to use when performing an animation. |
| UIPageLayout.GamepadInputEnabled | boolean | Controls the overrides of NextSelection{Up, Down, Left, Right}. Defaults to true. |
| UIPageLayout.Padding | UDim | Determines the amount that pages are separated from each other by. |
| UIPageLayout.ScrollWheelInputEnabled | boolean | Controls the use of scroll wheel, in case that it is intended for something else. Defaults to true. |
| UIPageLayout.TouchInputEnabled | boolean | Controls touch scrolling, in case this is a non-interactive layout. Defaults to true. |
| UIPageLayout.TweenTime | float | The length of the animation. |
Inherited from UIGridStyleLayout
| Name | Type / Returns | Description |
|---|---|---|
| UIGridStyleLayout.AbsoluteContentSize | Vector2 | The absolute size of space being taken up by the grid layout. |
| UIGridStyleLayout.FillDirection | FillDirection | Determines the axis in which UI objects are laid out. |
| UIGridStyleLayout.HorizontalAlignment | HorizontalAlignment | Determines the horizontal alignment of UI elements within the parent element. |
| UIGridStyleLayout.SortOrder | SortOrder | Determines the order in which child UI objects are placed in a layout. |
| UIGridStyleLayout.VerticalAlignment | VerticalAlignment | Determines the vertical alignment of UI elements within the parent element. |
Inherited from Instance
| Name | Type / Returns | Description |
|---|---|---|
| Instance.Archivable | boolean | Determines if an Instance and its descendants can be cloned using Instance:Clone(), and can be saved/published. |
| Instance.archivable | boolean | |
| Instance.Capabilities | SecurityCapabilities | The set of capabilities allowed to be used for scripts inside this container. |
| Instance.IsInSandbox | boolean | Indicates whether the instance is inside a sandboxed container. |
| Instance.Name | string | A non-unique identifier of the Instance. |
| Instance.Parent | Instance | Determines the hierarchical parent of the Instance. |
| Instance.PredictionMode | PredictionMode | Reflects the client-side prediction mode applied to the instance under server-authoritative physics. |
| Instance.RobloxLocked | boolean | A deprecated property that used to protect CoreGui objects. |
| Instance.Sandboxed | boolean | When enabled, the instance can only access abilities in its Capabilities list. |
| Instance.UniqueId | UniqueId | A unique identifier for the instance. |
Inherited from Object
| Name | Type / Returns | Description |
|---|---|---|
| Object.ClassName | string | A read-only string representing the class this Object belongs to. |
| Object.className | string |
UIPageLayout.Animated
When set to true, page transitions use the configured UIPageLayout.EasingStyle, UIPageLayout.EasingDirection, and UIPageLayout.TweenTime to animate the movement between pages. When set to false, page transitions are instantaneous. Defaults to true.
| Field | Value |
|---|---|
| type | boolean |
| security | {"read":"None","write":"None"} |
| thread safety | ReadSafe |
| category | Appearance |
| serialization | {"can_load":true,"can_save":true} |
| capabilities | ["UI"] |
UIPageLayout.Circular
When set to true, navigating past the last page wraps around to the first page, and navigating before the first page wraps to the last. Animated transitions take the shortest rotational path around the wrap boundary. When set to false, navigation stops at the first and last pages. Defaults to false.
| Field | Value |
|---|---|
| type | boolean |
| security | {"read":"None","write":"None"} |
| thread safety | ReadSafe |
| category | Appearance |
| serialization | {"can_load":true,"can_save":true} |
| capabilities | ["UI"] |
UIPageLayout.CurrentPage
A read-only reference to the GuiObject sibling that is currently displayed or is the target of an in-progress animation. The layout updates this property when pages change via UIPageLayout:Next(), UIPageLayout:Previous(), UIPageLayout:JumpTo(), UIPageLayout:JumpToIndex(), or through user input (touch swipe, scroll wheel, or gamepad). If no page has been explicitly navigated to, it defaults to the first visible GuiObject sibling in layout order.
| Field | Value |
|---|---|
| type | GuiObject |
| tags | ["ReadOnly","NotReplicated"] |
| security | {"read":"None","write":"None"} |
| thread safety | ReadSafe |
| category | Data |
| serialization | {"can_load":false,"can_save":true} |
| capabilities | ["UI"] |
UIPageLayout.EasingDirection
Determines the direction component of the easing function applied during animated page transitions. Combined with UIPageLayout.EasingStyle to form the full tween curve. Only takes effect when UIPageLayout.Animated is true. Defaults to EasingDirection.Out.
| Field | Value |
|---|---|
| type | EasingDirection |
| security | {"read":"None","write":"None"} |
| thread safety | ReadSafe |
| category | Appearance |
| serialization | {"can_load":true,"can_save":true} |
| capabilities | ["UI"] |
UIPageLayout.EasingStyle
Determines the easing curve applied during animated page transitions. Combined with UIPageLayout.EasingDirection to form the full tween curve. Only takes effect when UIPageLayout.Animated is true. Defaults to EasingStyle.Back.
| Field | Value |
|---|---|
| type | EasingStyle |
| security | {"read":"None","write":"None"} |
| thread safety | ReadSafe |
| category | Appearance |
| serialization | {"can_load":true,"can_save":true} |
| capabilities | ["UI"] |
UIPageLayout.GamepadInputEnabled
When set to true, the layout overrides sibling GuiObject.NextSelectionLeft and GuiObject.NextSelectionRight (for horizontal fill direction) or GuiObject.NextSelectionUp and GuiObject.NextSelectionDown (for vertical fill direction) so that gamepad directional navigation moves between pages. Additionally, the L1 and R1 bumper buttons advance to the previous and next page respectively. When false, gamepad input does not interact with the layout. Defaults to true.
| Field | Value |
|---|---|
| type | boolean |
| security | {"read":"None","write":"None"} |
| thread safety | ReadSafe |
| category | Input |
| serialization | {"can_load":true,"can_save":true} |
| capabilities | ["UI"] |
UIPageLayout.Padding
Determines the amount that pages are separated from each other by. Can be set either using scale (Percentage of parent's size in the current direction) or offset (a static spacing value, similar to pixel size).
| Field | Value |
|---|---|
| type | UDim |
| security | {"read":"None","write":"None"} |
| thread safety | ReadSafe |
| category | Appearance |
| serialization | {"can_load":true,"can_save":true} |
| capabilities | ["UI"] |
UIPageLayout.ScrollWheelInputEnabled
When set to true, mouse scroll wheel input navigates between pages. Scrolling up moves to the previous page and scrolling down moves to the next page. Set this to false when the scroll wheel is intended for other interactions in the UI. Defaults to true.
| Field | Value |
|---|---|
| type | boolean |
| security | {"read":"None","write":"None"} |
| thread safety | ReadSafe |
| category | Input |
| serialization | {"can_load":true,"can_save":true} |
| capabilities | ["UI"] |
UIPageLayout.TouchInputEnabled
When set to true, touch-based swipe gestures navigate between pages. Set this to false for layouts where touch input should not trigger page transitions, such as non-interactive displays. Defaults to true.
| Field | Value |
|---|---|
| type | boolean |
| security | {"read":"None","write":"None"} |
| thread safety | ReadSafe |
| category | Input |
| serialization | {"can_load":true,"can_save":true} |
| capabilities | ["UI"] |
UIPageLayout.TweenTime
The duration, in seconds, of the animated transition when navigating between pages. The value is clamped to a minimum of 0.01. Only takes effect when UIPageLayout.Animated is true. Defaults to 1.
| Field | Value |
|---|---|
| type | float |
| security | {"read":"None","write":"None"} |
| thread safety | ReadSafe |
| category | Appearance |
| serialization | {"can_load":true,"can_save":true} |
| capabilities | ["UI"] |
Methods
| Name | Type / Returns | Description |
|---|---|---|
| UIPageLayout:JumpTo | () | If the page is in the UIPageLayout, then it sets UIPageLayout.CurrentPage to it and animates to it. If the circular layout is enabled, it will take the shortest path to this page. |
| UIPageLayout:JumpToIndex | () | If the index is >= 0 and less than the size of the layout, this method acts like UIPageLayout:JumpTo(). Out-of-bounds indices are wrapped modulo the page count to determine the target page. |
| UIPageLayout:Next | () | Sets UIPageLayout.CurrentPage to the page after the current page and animates to it, or does nothing if there isn't a next page. |
| UIPageLayout:Previous | () | Sets UIPageLayout.CurrentPage to the page before the current page and animates to it, or does nothing if there isn't a previous page. |
Inherited from UIGridStyleLayout
| Name | Type / Returns | Description |
|---|---|---|
| UIGridStyleLayout:ApplyLayout | () | Force re-layout of sibling UI elements. |
| UIGridStyleLayout:SetCustomSortFunction | () | Sets the function used to determine the order of elements when SortOrder is set to Custom. |
Inherited from Instance
| Name | Type / Returns | Description |
|---|---|---|
| Instance:AddTag | () | Applies a tag to the instance. |
| Instance:children | Instances | Returns an array of the object's children. |
| Instance:ClearAllChildren | () | This method destroys all of an instance's children. |
| Instance:Clone | Instance | Create a copy of an instance and all its descendants, ignoring instances that are not Archivable. |
| Instance:clone | Instance | |
| Instance:Destroy | () | Sets the Instance.Parent property to nil, locks the Instance.Parent property, disconnects all connections, and calls Destroy() on all children. |
| Instance:destroy | () | |
| Instance:FindFirstAncestor | Instance? | Returns the first ancestor of the Instance whose Instance.Name is equal to the given name. |
| Instance:FindFirstAncestorOfClass | Instance? | Returns the first ancestor of the Instance whose Object.ClassName is equal to the given className. |
| Instance:FindFirstAncestorWhichIsA | Instance? | Returns the first ancestor of the Instance for whom Object:IsA() returns true for the given className. |
| Instance:FindFirstChild | Instance? | Returns the first child of the Instance found with the given name. |
| Instance:findFirstChild | Instance | |
| Instance:FindFirstChildOfClass | Instance? | Returns the first child of the Instance whose ClassName is equal to the given class name. |
| Instance:FindFirstChildWhichIsA | Instance? | Returns the first child of the Instance for whom Object:IsA() returns true for the given className. |
| Instance:FindFirstDescendant | Instance? | Returns the first descendant found with the given Instance.Name. |
| Instance:GetActor | Actor? | Returns the Actor associated with the Instance, if any. |
| Instance:GetAttribute | Variant | Returns the value which has been assigned to the given attribute name. |
| Instance:GetAttributeChangedSignal | RBXScriptSignal | Returns an event that fires when the given attribute changes. |
| Instance:GetAttributes | Dictionary | Returns a dictionary of the instance's attributes. |
| Instance:GetChildren | Instances | Returns an array containing all of the instance's children. |
| Instance:getChildren | Instances | |
| Instance:GetDebugId | string | Returns a coded string of the debug ID used internally by Roblox. |
| Instance:GetDescendants | Instances | Returns an array containing all of the descendants of the instance. |
| Instance:GetFullName | string | Returns a string describing the instance's ancestry. |
| Instance:GetStyled | Variant | Returns the styled or explicitly modified value of the specified property, or else the default property value if it hasn't been styled/modified. |
| Instance:GetStyledPropertyChangedSignal | RBXScriptSignal | Returns an event that fires when the given style property changes on the instance. |
| Instance:GetTags | Array | Gets an array of all tags applied to the instance. |
| Instance:HasTag | boolean | Check whether the instance has a given tag. |
| Instance:IsAncestorOf | boolean | Returns true if an Instance is an ancestor of the given descendant. |
| Instance:IsDescendantOf | boolean | Returns true if an Instance is a descendant of the given ancestor. |
| Instance:isDescendantOf | boolean | |
| Instance:IsPropertyModified | boolean | Returns true if the value stored in the specified property is not equal to the code-instantiated default. |
| Instance:QueryDescendants | Instances | Returns an array containing all descendants of the instance that match the selector string. |
| Instance:Remove | () | Sets the object's Parent to nil, and does the same for all its descendants. |
| Instance:remove | () | |
| Instance:RemoveTag | () | Removes a tag from the instance. |
| Instance:ResetPropertyToDefault | () | Resets a property to its default value. |
| Instance:SetAttribute | () | Sets the attribute with the given name to the given value. |
| Instance:WaitForChild | Instance | Returns the child of the Instance with the given name. If the child does not exist, it will yield the current thread until it does. |
Inherited from Object
| Name | Type / Returns | Description |
|---|---|---|
| Object:GetPropertyChangedSignal | RBXScriptSignal | Get an event that fires when a given property of the object changes. |
| Object:IsA | boolean | Returns true if an object's class matches or inherits from a given class. |
| Object:isA | boolean |
UIPageLayout:JumpTo
Navigates to a specific page within the layout. The page argument must be a GuiObject that is a visible sibling managed by this layout; passing nil or an instance that is not part of the layout throws an error. Sets UIPageLayout.CurrentPage to the target and animates the transition (or jumps instantly if UIPageLayout.Animated is false). When UIPageLayout.Circular is true, the animation takes the shortest rotational path to the target page.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
| page | Instance | The GuiObject sibling to navigate to. |
Returns
| Type | Description |
|---|---|
| () |
| Field | Value |
|---|---|
| security | None |
| thread safety | Unsafe |
| capabilities | ["UI"] |
UIPageLayout:JumpToIndex
Navigates to the page at the given zero-based index in layout order. If the index is within the valid range (0 to page count minus 1), this method behaves like UIPageLayout:JumpTo(). Out-of-bounds indices are wrapped modulo the page count to determine the final page.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
| index | int | The zero-based position of the target page in layout order. |
Returns
| Type | Description |
|---|---|
| () |
| Field | Value |
|---|---|
| security | None |
| thread safety | Unsafe |
| capabilities | ["UI"] |
UIPageLayout:Next
Advances UIPageLayout.CurrentPage to the next page in layout order and animates the transition (or jumps instantly if UIPageLayout.Animated is false). If the current page is already the last page and UIPageLayout.Circular is false, this method does nothing. If UIPageLayout.Circular is true, it wraps from the last page to the first.
Returns
| Type | Description |
|---|---|
| () |
| Field | Value |
|---|---|
| security | None |
| thread safety | Unsafe |
| capabilities | ["UI"] |
UIPageLayout:Previous
Moves UIPageLayout.CurrentPage to the previous page in layout order and animates the transition (or jumps instantly if UIPageLayout.Animated is false). If the current page is already the first page and UIPageLayout.Circular is false, this method does nothing. If UIPageLayout.Circular is true, it wraps from the first page to the last.
Returns
| Type | Description |
|---|---|
| () |
| Field | Value |
|---|---|
| security | None |
| thread safety | Unsafe |
| capabilities | ["UI"] |
Events
| Name | Type / Returns | Description |
|---|---|---|
| UIPageLayout.PageEnter | Fires when a page comes into view, and is going to be rendered. | |
| UIPageLayout.PageLeave | Fires when a page leaves view, and will not be rendered. | |
| UIPageLayout.Stopped | Fires when an animation to UIPageLayout.CurrentPage is completed without being canceled, and the view stops scrolling. |
Inherited from Instance
| Name | Type / Returns | Description |
|---|---|---|
| Instance.AncestryChanged | Fires when the Instance.Parent property of this object or one of its ancestors is changed. | |
| Instance.AttributeChanged | Fires whenever an attribute is changed on the Instance. | |
| Instance.ChildAdded | Fires after an object is parented to this Instance. | |
| Instance.childAdded | ||
| Instance.ChildRemoved | Fires after a child is removed from this Instance. | |
| Instance.DescendantAdded | Fires after a descendant is added to the Instance. | |
| Instance.DescendantRemoving | Fires immediately before a descendant of the Instance is removed. | |
| Instance.Destroying | Fires immediately before (or is deferred until after) the instance is destroyed via Instance:Destroy(). | |
| Instance.StyledPropertiesChanged | Fires whenever any style property is changed on the instance, including when a property is set to nil. |
Inherited from Object
| Name | Type / Returns | Description |
|---|---|---|
| Object.Changed | Fires immediately after a property of the object changes, with some limitations. |
UIPageLayout.PageEnter
Fires when a sibling page's bounding rect begins intersecting the parent's clip region, causing it to become visible and rendered. The page parameter is the GuiObject that entered view. This event fires on the frame the page's visibility flips from hidden to shown, whether due to an animated transition, a programmatic jump, or user input scrolling.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
| page | Instance | The GuiObject that entered view. |
| Field | Value |
|---|---|
| security | None |
| capabilities | ["UI"] |
UIPageLayout.PageLeave
Fires when a sibling page's bounding rect stops intersecting the parent's clip region, causing it to become hidden and no longer rendered. The page parameter is the GuiObject that left view. This event fires on the frame the page's visibility flips from shown to hidden, whether due to an animated transition, a programmatic jump, or user input scrolling.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
| page | Instance | The GuiObject that left view. |
| Field | Value |
|---|---|
| security | None |
| capabilities | ["UI"] |
UIPageLayout.Stopped
Fires when a page-navigation animation reaches its target without being interrupted by new input, and the view comes to rest. The currentPage parameter is the GuiObject now displayed. This event does not fire for programmatic transitions made while UIPageLayout.Animated is false, since those snap to the target page instantly.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
| currentPage | Instance | The GuiObject now displayed after the transition completed. |
| Field | Value |
|---|---|
| security | None |
| capabilities | ["UI"] |