Reference API Roblox

Engine API

Website

Related

Reference API Roblox

UIPageLayout

Positions sibling UI elements as full-size pages in a single row or column that users can scroll or animate through one page at a time.

Member index 17

HistoryMember
731Animated: bool
731Circular: bool
731CurrentPage: GuiObject
731EasingDirection: EasingDirection
731EasingStyle: EasingStyle
731GamepadInputEnabled: bool
731Padding: UDim
731ScrollWheelInputEnabled: bool
731TouchInputEnabled: bool
731TweenTime: float
573JumpTo(page: Instance): null
573JumpToIndex(index: int): null
573Next(): null
573Previous(): null
462PageEnter(page: Instance)
462PageLeave(page: Instance)
462Stopped(currentPage: Instance)
inherited from UIGridStyleLayout
731AbsoluteContentSize: Vector2
731FillDirection: FillDirection
731HorizontalAlignment: HorizontalAlignment
731SortOrder: SortOrder
731VerticalAlignment: VerticalAlignment
573ApplyLayout(): null
573SetCustomSortFunction(function: Function = nil): null
inherited from Instance
731Archivable: bool
731Capabilities: SecurityCapabilities
731IsInSandbox: bool
731Name: string
731Parent: Instance
731PredictionMode: PredictionMode
731Sandboxed: bool
731UniqueId: UniqueId
576AddTag(tag: string): null
573ClearAllChildren(): null
462Clone(): Instance
573Destroy(): null
486FindFirstAncestor(name: string): Instance
486FindFirstAncestorOfClass(className: string): Instance
486FindFirstAncestorWhichIsA(className: string): Instance
486FindFirstChild(name: string, recursive: bool = false): Instance
486FindFirstChildOfClass(className: string): Instance
486FindFirstChildWhichIsA(className: string, recursive: bool = false): Instance
486FindFirstDescendant(name: string): Instance
563GetActor(): Actor
486GetAttribute(attribute: string): Variant
462GetAttributeChangedSignal(attribute: string): RBXScriptSignal
631GetAttributes(): Dictionary
648GetChildren(): Instances
462GetDebugId(scopeLength: int = 4): string
707GetDescendants(): Instances
486GetFullName(): string
706GetStyled(name: string, selector: string?): Variant
657GetStyledPropertyChangedSignal(property: string): RBXScriptSignal
576GetTags(): Array
576HasTag(tag: string): bool
486IsAncestorOf(descendant: Instance): bool
486IsDescendantOf(ancestor: Instance): bool
664IsPropertyModified(property: string): bool
698QueryDescendants(selector: string): Instances
573Remove(): null
576RemoveTag(tag: string): null
664ResetPropertyToDefault(property: string): null
573SetAttribute(attribute: string, value: Variant): null
462WaitForChild(childName: string, timeOut: double): Instance
731children(): Instances
731clone(): Instance
731destroy(): null
731findFirstChild(name: string, recursive: bool = false): Instance
731getChildren(): Instances
731isDescendantOf(ancestor: Instance): bool
731remove(): null
462AncestryChanged(child: Instance, parent: Instance)
462AttributeChanged(attribute: string)
462ChildAdded(child: Instance)
462ChildRemoved(child: Instance)
462DescendantAdded(descendant: Instance)
462DescendantRemoving(descendant: Instance)
500Destroying()
657StyledPropertiesChanged()
731childAdded(child: Instance)
inherited from Object
731ClassName: string
731className: string
647GetPropertyChangedSignal(property: string): RBXScriptSignal
647IsA(className: string): bool
731isA(className: string): bool
647Changed(property: string)

Description

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.

History 81

Members 17

Animated

TypeDefault
booltrue

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.

History 6

Circular

TypeDefault
boolfalse

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.

History 6

CurrentPage

TypeDefault
GuiObject

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.

This property is not replicated. Its interface does not cross the network boundary.
This property is read-only. Its value can be read, but it cannot be modified.

History 8

Tags: [ReadOnly, NotReplicated]

EasingDirection

TypeDefault
EasingDirectionOut

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.

History 6

EasingStyle

TypeDefault
EasingStyleBack

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.

History 6

GamepadInputEnabled

TypeDefault
booltrue

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.

History 6

JumpTo

Parameters (1)
pageInstance
Returns (1)
null

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.

History 3

JumpToIndex

Parameters (1)
indexint
Returns (1)
null

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.

History 3

Next

Parameters (0)
No parameters.
Returns (1)
null

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.

History 3

Padding

TypeDefault
UDim0, 0

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).

History 6

PageEnter

Parameters (1)
pageInstance

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.

History 2

PageLeave

Parameters (1)
pageInstance

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.

History 2

Previous

Parameters (0)
No parameters.
Returns (1)
null

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.

History 3

ScrollWheelInputEnabled

TypeDefault
booltrue

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.

History 6

Stopped

Parameters (1)
currentPageInstance

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.

History 2

TouchInputEnabled

TypeDefault
booltrue

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.

History 6

TweenTime

TypeDefault
float1

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.

History 6

Settings