12 min read

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

NameType / ReturnsDescription
UIPageLayout.AnimatedbooleanWhether or not to animate transitions between pages.
UIPageLayout.CircularbooleanWhether or not the page layout wraps around at the ends.
UIPageLayout.CurrentPageGuiObjectThe page that is either currently being displayed or is the target of the current animation.
UIPageLayout.EasingDirectionEasingDirectionThe easing direction to use when performing an animation.
UIPageLayout.EasingStyleEasingStyleThe easing style to use when performing an animation.
UIPageLayout.GamepadInputEnabledbooleanControls the overrides of NextSelection{Up, Down, Left, Right}. Defaults to true.
UIPageLayout.PaddingUDimDetermines the amount that pages are separated from each other by.
UIPageLayout.ScrollWheelInputEnabledbooleanControls the use of scroll wheel, in case that it is intended for something else. Defaults to true.
UIPageLayout.TouchInputEnabledbooleanControls touch scrolling, in case this is a non-interactive layout. Defaults to true.
UIPageLayout.TweenTimefloatThe length of the animation.

Inherited from UIGridStyleLayout

NameType / ReturnsDescription
UIGridStyleLayout.AbsoluteContentSizeVector2The absolute size of space being taken up by the grid layout.
UIGridStyleLayout.FillDirectionFillDirectionDetermines the axis in which UI objects are laid out.
UIGridStyleLayout.HorizontalAlignmentHorizontalAlignmentDetermines the horizontal alignment of UI elements within the parent element.
UIGridStyleLayout.SortOrderSortOrderDetermines the order in which child UI objects are placed in a layout.
UIGridStyleLayout.VerticalAlignmentVerticalAlignmentDetermines the vertical alignment of UI elements within the parent element.

Inherited from Instance

NameType / ReturnsDescription
Instance.ArchivablebooleanDetermines if an Instance and its descendants can be cloned using Instance:Clone(), and can be saved/published.
Instance.archivableboolean
Instance.CapabilitiesSecurityCapabilitiesThe set of capabilities allowed to be used for scripts inside this container.
Instance.IsInSandboxbooleanIndicates whether the instance is inside a sandboxed container.
Instance.NamestringA non-unique identifier of the Instance.
Instance.ParentInstanceDetermines the hierarchical parent of the Instance.
Instance.PredictionModePredictionModeReflects the client-side prediction mode applied to the instance under server-authoritative physics.
Instance.RobloxLockedbooleanA deprecated property that used to protect CoreGui objects.
Instance.SandboxedbooleanWhen enabled, the instance can only access abilities in its Capabilities list.
Instance.UniqueIdUniqueIdA unique identifier for the instance.

Inherited from Object

NameType / ReturnsDescription
Object.ClassNamestringA read-only string representing the class this Object belongs to.
Object.classNamestring

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.

FieldValue
typeboolean
security{"read":"None","write":"None"}
thread safetyReadSafe
categoryAppearance
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.

FieldValue
typeboolean
security{"read":"None","write":"None"}
thread safetyReadSafe
categoryAppearance
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.

FieldValue
typeGuiObject
tags["ReadOnly","NotReplicated"]
security{"read":"None","write":"None"}
thread safetyReadSafe
categoryData
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.

FieldValue
typeEasingDirection
security{"read":"None","write":"None"}
thread safetyReadSafe
categoryAppearance
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.

FieldValue
typeEasingStyle
security{"read":"None","write":"None"}
thread safetyReadSafe
categoryAppearance
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.

FieldValue
typeboolean
security{"read":"None","write":"None"}
thread safetyReadSafe
categoryInput
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).

FieldValue
typeUDim
security{"read":"None","write":"None"}
thread safetyReadSafe
categoryAppearance
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.

FieldValue
typeboolean
security{"read":"None","write":"None"}
thread safetyReadSafe
categoryInput
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.

FieldValue
typeboolean
security{"read":"None","write":"None"}
thread safetyReadSafe
categoryInput
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.

FieldValue
typefloat
security{"read":"None","write":"None"}
thread safetyReadSafe
categoryAppearance
serialization{"can_load":true,"can_save":true}
capabilities["UI"]

Methods

NameType / ReturnsDescription
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

NameType / ReturnsDescription
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

NameType / ReturnsDescription
Instance:AddTag()Applies a tag to the instance.
Instance:childrenInstancesReturns an array of the object's children.
Instance:ClearAllChildren()This method destroys all of an instance's children.
Instance:CloneInstanceCreate a copy of an instance and all its descendants, ignoring instances that are not Archivable.
Instance:cloneInstance
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:FindFirstAncestorInstance?Returns the first ancestor of the Instance whose Instance.Name is equal to the given name.
Instance:FindFirstAncestorOfClassInstance?Returns the first ancestor of the Instance whose Object.ClassName is equal to the given className.
Instance:FindFirstAncestorWhichIsAInstance?Returns the first ancestor of the Instance for whom Object:IsA() returns true for the given className.
Instance:FindFirstChildInstance?Returns the first child of the Instance found with the given name.
Instance:findFirstChildInstance
Instance:FindFirstChildOfClassInstance?Returns the first child of the Instance whose ClassName is equal to the given class name.
Instance:FindFirstChildWhichIsAInstance?Returns the first child of the Instance for whom Object:IsA() returns true for the given className.
Instance:FindFirstDescendantInstance?Returns the first descendant found with the given Instance.Name.
Instance:GetActorActor?Returns the Actor associated with the Instance, if any.
Instance:GetAttributeVariantReturns the value which has been assigned to the given attribute name.
Instance:GetAttributeChangedSignalRBXScriptSignalReturns an event that fires when the given attribute changes.
Instance:GetAttributesDictionaryReturns a dictionary of the instance's attributes.
Instance:GetChildrenInstancesReturns an array containing all of the instance's children.
Instance:getChildrenInstances
Instance:GetDebugIdstringReturns a coded string of the debug ID used internally by Roblox.
Instance:GetDescendantsInstancesReturns an array containing all of the descendants of the instance.
Instance:GetFullNamestringReturns a string describing the instance's ancestry.
Instance:GetStyledVariantReturns the styled or explicitly modified value of the specified property, or else the default property value if it hasn't been styled/modified.
Instance:GetStyledPropertyChangedSignalRBXScriptSignalReturns an event that fires when the given style property changes on the instance.
Instance:GetTagsArrayGets an array of all tags applied to the instance.
Instance:HasTagbooleanCheck whether the instance has a given tag.
Instance:IsAncestorOfbooleanReturns true if an Instance is an ancestor of the given descendant.
Instance:IsDescendantOfbooleanReturns true if an Instance is a descendant of the given ancestor.
Instance:isDescendantOfboolean
Instance:IsPropertyModifiedbooleanReturns true if the value stored in the specified property is not equal to the code-instantiated default.
Instance:QueryDescendantsInstancesReturns 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:WaitForChildInstanceReturns 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

NameType / ReturnsDescription
Object:GetPropertyChangedSignalRBXScriptSignalGet an event that fires when a given property of the object changes.
Object:IsAbooleanReturns true if an object's class matches or inherits from a given class.
Object:isAboolean

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

NameTypeDefaultDescription
pageInstanceThe GuiObject sibling to navigate to.

Returns

TypeDescription
()
FieldValue
securityNone
thread safetyUnsafe
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

NameTypeDefaultDescription
indexintThe zero-based position of the target page in layout order.

Returns

TypeDescription
()
FieldValue
securityNone
thread safetyUnsafe
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

TypeDescription
()
FieldValue
securityNone
thread safetyUnsafe
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

TypeDescription
()
FieldValue
securityNone
thread safetyUnsafe
capabilities["UI"]

Events

NameType / ReturnsDescription
UIPageLayout.PageEnterFires when a page comes into view, and is going to be rendered.
UIPageLayout.PageLeaveFires when a page leaves view, and will not be rendered.
UIPageLayout.StoppedFires when an animation to UIPageLayout.CurrentPage is completed without being canceled, and the view stops scrolling.

Inherited from Instance

NameType / ReturnsDescription
Instance.AncestryChangedFires when the Instance.Parent property of this object or one of its ancestors is changed.
Instance.AttributeChangedFires whenever an attribute is changed on the Instance.
Instance.ChildAddedFires after an object is parented to this Instance.
Instance.childAdded
Instance.ChildRemovedFires after a child is removed from this Instance.
Instance.DescendantAddedFires after a descendant is added to the Instance.
Instance.DescendantRemovingFires immediately before a descendant of the Instance is removed.
Instance.DestroyingFires immediately before (or is deferred until after) the instance is destroyed via Instance:Destroy().
Instance.StyledPropertiesChangedFires whenever any style property is changed on the instance, including when a property is set to nil.

Inherited from Object

NameType / ReturnsDescription
Object.ChangedFires 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

NameTypeDefaultDescription
pageInstanceThe GuiObject that entered view.
FieldValue
securityNone
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

NameTypeDefaultDescription
pageInstanceThe GuiObject that left view.
FieldValue
securityNone
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

NameTypeDefaultDescription
currentPageInstanceThe GuiObject now displayed after the transition completed.
FieldValue
securityNone
capabilities["UI"]