# UIPageLayout

Roblox Engine API class from Roblox Studio 0.744.0.7441077 (version-7aaa6838d36c4448).

- Inherits from, nearest first: [UIGridStyleLayout](https://rapi.sleaze.dev/classes/UIGridStyleLayout.md), [UILayout](https://rapi.sleaze.dev/classes/UILayout.md), [UIComponent](https://rapi.sleaze.dev/classes/UIComponent.md), [UIBase](https://rapi.sleaze.dev/classes/UIBase.md), [Instance](https://rapi.sleaze.dev/classes/Instance.md), [Object](https://rapi.sleaze.dev/classes/Object.md)
- Memory category: Instances
- HTML page: https://rapi.sleaze.dev/classes/UIPageLayout/
- Roblox documentation: https://create.roblox.com/docs/reference/engine/classes/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.

## Properties

### Animated

```luau
UIPageLayout.Animated: boolean = true
```

- Tags: Read capabilities: UI

Whether or not to animate transitions between pages.

### Circular

```luau
UIPageLayout.Circular: boolean = false
```

- Tags: Read capabilities: UI

Whether or not the page layout wraps around at the ends.

### EasingDirection

```luau
UIPageLayout.EasingDirection: Enum.EasingDirection = Enum.EasingDirection.Out
```

- Tags: Read capabilities: UI

The easing direction to use when performing an animation.

### EasingStyle

```luau
UIPageLayout.EasingStyle: Enum.EasingStyle = Enum.EasingStyle.Back
```

- Tags: Read capabilities: UI

The easing style to use when performing an animation.

### Padding

```luau
UIPageLayout.Padding: UDim = UDim.new(0, 0)
```

- Tags: Read capabilities: UI

Determines the amount that pages are separated from each other by.

### TweenTime

```luau
UIPageLayout.TweenTime: number = 1
```

- Tags: Read capabilities: UI

The length of the animation.

### CurrentPage

```luau
UIPageLayout.CurrentPage: GuiObject
```

- Tags: Read only, Read capabilities: UI, Save only

The page that is either currently being displayed or is the target of the current animation.

### GamepadInputEnabled

```luau
UIPageLayout.GamepadInputEnabled: boolean = true
```

- Tags: Read capabilities: UI

Controls the overrides of `NextSelection{Up, Down, Left, Right}`. Defaults to true.

### ScrollWheelInputEnabled

```luau
UIPageLayout.ScrollWheelInputEnabled: boolean = true
```

- Tags: Read capabilities: UI

Controls the use of scroll wheel, in case that it is intended for something else. Defaults to true.

### TouchInputEnabled

```luau
UIPageLayout.TouchInputEnabled: boolean = true
```

- Tags: Read capabilities: UI

Controls touch scrolling, in case this is a non-interactive layout. Defaults to true.

## Methods

### JumpTo

```luau
UIPageLayout:JumpTo(page: Instance)
```

- Tags: Capabilities: UI

If the `page` is in the UIPageLayout, then it sets [`UIPageLayout.CurrentPage`](https://rapi.sleaze.dev/classes/UIPageLayout.md) to it and animates to it. If the circular layout is enabled, it will take the shortest path to this page.

Parameters:

- `page`: The [`GuiObject`](https://rapi.sleaze.dev/classes/GuiObject.md) sibling to navigate to.

### JumpToIndex

```luau
UIPageLayout:JumpToIndex(index: number)
```

- Tags: Capabilities: UI

If the index is `>= 0` and less than the size of the layout, this method acts like [`UIPageLayout:JumpTo()`](https://rapi.sleaze.dev/classes/UIPageLayout.md). Out-of-bounds indices are wrapped modulo the page count to determine the target page.

Parameters:

- `index`: The zero-based position of the target page in layout order.

### Next

```luau
UIPageLayout:Next()
```

- Tags: Capabilities: UI

Sets [`UIPageLayout.CurrentPage`](https://rapi.sleaze.dev/classes/UIPageLayout.md) to the page after the current page and animates to it, or does nothing if there isn't a next page.

### Previous

```luau
UIPageLayout:Previous()
```

- Tags: Capabilities: UI

Sets [`UIPageLayout.CurrentPage`](https://rapi.sleaze.dev/classes/UIPageLayout.md) to the page before the current page and animates to it, or does nothing if there isn't a previous page.

## Events

### PageEnter

```luau
UIPageLayout.PageEnter: RBXScriptSignal<(page: Instance)>
```

- Tags: Capabilities: UI

Fires when a page comes into view, and is going to be rendered.

### PageLeave

```luau
UIPageLayout.PageLeave: RBXScriptSignal<(page: Instance)>
```

- Tags: Capabilities: UI

Fires when a page leaves view, and will not be rendered.

### Stopped

```luau
UIPageLayout.Stopped: RBXScriptSignal<(currentPage: Instance)>
```

- Tags: Capabilities: UI

Fires when an animation to [`UIPageLayout.CurrentPage`](https://rapi.sleaze.dev/classes/UIPageLayout.md) is completed without being canceled, and the view stops scrolling.

## Inherited members

- From [UIGridStyleLayout](https://rapi.sleaze.dev/classes/UIGridStyleLayout.md): `HorizontalAlignment`, `VerticalAlignment`, `FillDirection`, `SortOrder`, `AbsoluteContentSize`, `ApplyLayout`, `SetCustomSortFunction`
- From [Instance](https://rapi.sleaze.dev/classes/Instance.md): `Archivable`, `archivable`, `Attributes`, `AttributesReplicate`, `AttributesSerialize`, `HistoryId`, `Name`, `Parent`, `PredictionMode`, `PropertyStatusStudio`, `RobloxLocked`, `SerializedOverrides`, `SourceAssetId`, `Tags`, `UniqueId`, `numExpectedDirectChildren`, `DataCost`, `Capabilities`, `DefinesCapabilities`, `IsInSandbox`, `Sandboxed`, `AddTag`, `ClearAllChildren`, `Clone`, `Destroy`, `FindFirstAncestor`, `FindFirstAncestorOfClass`, `FindFirstAncestorWhichIsA`, `FindFirstChild`, `FindFirstChildOfClass`, `FindFirstChildWhichIsA`, `FindFirstDescendant`, `GetActor`, `GetAttribute`, `GetAttributeChangedSignal`, `GetAttributes`, `GetChildren`, `GetDebugId`, `GetDescendants`, `GetFullName`, `GetStyled`, `GetStyledPropertyChangedSignal`, `GetTags`, `HasTag`, `IsAncestorOf`, `IsDescendantOf`, `IsPropertyModified`, `QueryDescendants`, `RemoveTag`, `ResetPropertyToDefault`, `SetAttribute`, `WaitForChild`, `Remove`, `children`, `clone`, `destroy`, `findFirstChild`, `getChildren`, `isDescendantOf`, `remove`, `AncestryChanged`, `AttributeChanged`, `ChildAdded`, `ChildRemoved`, `DescendantAdded`, `DescendantRemoving`, `Destroying`, `StyledPropertiesChanged`, `childAdded`
- From [Object](https://rapi.sleaze.dev/classes/Object.md): `ClassName`, `className`, `GetPropertyChangedSignal`, `IsA`, `isA`, `Changed`
