# ScrollingFrame

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

- Inherits from, nearest first: [GuiObject](https://rapi.sleaze.dev/classes/GuiObject.md), [GuiBase2d](https://rapi.sleaze.dev/classes/GuiBase2d.md), [GuiBase](https://rapi.sleaze.dev/classes/GuiBase.md), [Instance](https://rapi.sleaze.dev/classes/Instance.md), [Object](https://rapi.sleaze.dev/classes/Object.md)
- Memory category: Gui
- HTML page: https://rapi.sleaze.dev/classes/ScrollingFrame/
- Roblox documentation: https://create.roblox.com/docs/reference/engine/classes/ScrollingFrame

[`ScrollingFrame`](https://rapi.sleaze.dev/classes/ScrollingFrame.md) is a special [`Frame`](https://rapi.sleaze.dev/classes/Frame.md) type with built-in scrolling interactivity and different ways to customize how the scrolling works.

## Properties

### DraggingScrollBar

```luau
ScrollingFrame.DraggingScrollBar: Enum.DraggingScrollBar = Enum.DraggingScrollBar.None
```

- Tags: Hidden, Read only, Roblox script security, Read capabilities: UI

### HorizontalBarRect

```luau
ScrollingFrame.HorizontalBarRect: Rect = Rect.new(0, 0, 0, 0)
```

- Tags: Hidden, Read only, Roblox script security, Read capabilities: UI

### MaxCanvasPosition

```luau
ScrollingFrame.MaxCanvasPosition: Vector2 = Vector2.zero
```

- Tags: Hidden, Read only, Roblox script security, Read capabilities: UI

### VerticalBarRect

```luau
ScrollingFrame.VerticalBarRect: Rect = Rect.new(0, 0, 0, 0)
```

- Tags: Hidden, Read only, Roblox script security, Read capabilities: UI

### AbsoluteCanvasSize

```luau
ScrollingFrame.AbsoluteCanvasSize: Vector2 = Vector2.zero
```

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

The size of the area that is scrollable, in offsets.

### AbsoluteWindowSize

```luau
ScrollingFrame.AbsoluteWindowSize: Vector2 = Vector2.zero
```

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

The size of the frame, in offsets, without the scroll bars.

### AutomaticCanvasSize

```luau
ScrollingFrame.AutomaticCanvasSize: Enum.AutomaticSize = Enum.AutomaticSize.None
```

- Tags: Read capabilities: UI

Determines whether [`ScrollingFrame.CanvasSize`](https://rapi.sleaze.dev/classes/ScrollingFrame.md) is resized based on child content.

### BottomImage

```luau
ScrollingFrame.BottomImage: string = "rbxasset://textures/ui/Scroll/scroll-bottom.png"
```

- Tags: Read capabilities: UI

Image that displays on the bottom of a vertical scroll bar, or the right of a horizontal scroll bar (rotated 90° counterclockwise for a horizontal scroll bar).

### BottomImageContent

```luau
ScrollingFrame.BottomImageContent: Content
```

- Tags: Read capabilities: UI

The [`Content`](https://rapi.sleaze.dev/index/types/Content.md)-typed equivalent of [`BottomImage`](https://rapi.sleaze.dev/classes/ScrollingFrame.md).

### CanvasPosition

```luau
ScrollingFrame.CanvasPosition: Vector2 = Vector2.zero
```

- Tags: Read capabilities: UI

Reflects the **current** positional offset of the canvas within the frame, in pixels, and sets the position of scroll bars accordingly.

### CanvasSize

```luau
ScrollingFrame.CanvasSize: UDim2 = UDim2.new(0, 0, 2, 0)
```

- Tags: Read capabilities: UI

Determines the size of the scrollable area.

### ElasticBehavior

```luau
ScrollingFrame.ElasticBehavior: Enum.ElasticBehavior = Enum.ElasticBehavior.WhenScrollable
```

- Tags: Read capabilities: UI

Determines if and when elastic scrolling is allowed on touch‑enabled devices.

### HorizontalScrollBarInset

```luau
ScrollingFrame.HorizontalScrollBarInset: Enum.ScrollBarInset = Enum.ScrollBarInset.None
```

- Tags: Read capabilities: UI

Indicates whether [`CanvasSize`](https://rapi.sleaze.dev/classes/ScrollingFrame.md) is inset by [`ScrollBarThickness`](https://rapi.sleaze.dev/classes/ScrollingFrame.md) on the horizontal axis.

### MidImage

```luau
ScrollingFrame.MidImage: string = "rbxasset://textures/ui/Scroll/scroll-middle.png"
```

- Tags: Read capabilities: UI

Image which spans the area between [`TopImage`](https://rapi.sleaze.dev/classes/ScrollingFrame.md) and [`BottomImage`](https://rapi.sleaze.dev/classes/ScrollingFrame.md) (rotated 90° counterclockwise for a horizontal scroll bar).

### MidImageContent

```luau
ScrollingFrame.MidImageContent: Content
```

- Tags: Read capabilities: UI

The [`Content`](https://rapi.sleaze.dev/index/types/Content.md)-typed equivalent of [`MidImage`](https://rapi.sleaze.dev/classes/ScrollingFrame.md).

### ScrollBarImageColor3

```luau
ScrollingFrame.ScrollBarImageColor3: Color3 = Color3.new(1, 1, 1)
```

- Tags: Read capabilities: UI

Determines how the rendered scroll bar images are colorized.

### ScrollBarImageTransparency

```luau
ScrollingFrame.ScrollBarImageTransparency: number = 0
```

- Tags: Read capabilities: UI

Determines the opacity of the scroll bar images.

### ScrollBarThickness

```luau
ScrollingFrame.ScrollBarThickness: number = 12
```

- Tags: Read capabilities: UI

Thickness of the scroll bar in pixels; applies to both horizontal and vertical scroll bars.

### ScrollingDirection

```luau
ScrollingFrame.ScrollingDirection: Enum.ScrollingDirection = Enum.ScrollingDirection.XY
```

- Tags: Read capabilities: UI

Determines the direction(s) in which scrolling is allowed.

### ScrollingEnabled

```luau
ScrollingFrame.ScrollingEnabled: boolean = true
```

- Tags: Read capabilities: UI

Determines whether scrolling is allowed on the frame.

### ScrollRate

```luau
ScrollingFrame.ScrollRate: number = 1
```

- Tags: Hidden, Not replicated, Roblox script security, Read capabilities: UI

### ScrollVelocity

```luau
ScrollingFrame.ScrollVelocity: Vector2 = Vector2.zero
```

- Tags: Hidden, Not replicated, Roblox script security, Read capabilities: UI

### SmoothScroll

```luau
ScrollingFrame.SmoothScroll: boolean = true
```

- Tags: Hidden, Not replicated, Roblox script security, Read capabilities: UI

### TopImage

```luau
ScrollingFrame.TopImage: string = "rbxasset://textures/ui/Scroll/scroll-top.png"
```

- Tags: Read capabilities: UI

Image which displays on the top of a vertical scroll bar, or the left of a horizontal scroll bar (rotated 90° counterclockwise for a horizontal scroll bar).

### TopImageContent

```luau
ScrollingFrame.TopImageContent: Content
```

- Tags: Read capabilities: UI

The [`Content`](https://rapi.sleaze.dev/index/types/Content.md)-typed equivalent of [`TopImage`](https://rapi.sleaze.dev/classes/ScrollingFrame.md).

### VerticalScrollBarInset

```luau
ScrollingFrame.VerticalScrollBarInset: Enum.ScrollBarInset = Enum.ScrollBarInset.None
```

- Tags: Read capabilities: UI

Indicates whether [`CanvasSize`](https://rapi.sleaze.dev/classes/ScrollingFrame.md) is inset by [`ScrollBarThickness`](https://rapi.sleaze.dev/classes/ScrollingFrame.md) on the vertical axis.

### VerticalScrollBarPosition

```luau
ScrollingFrame.VerticalScrollBarPosition: Enum.VerticalScrollBarPosition = Enum.VerticalScrollBarPosition.Right
```

- Tags: Read capabilities: UI

Indicates whether the vertical scroll bar is positioned to the left or right of the canvas.

## Methods

### ClearInertialScrolling

```luau
ScrollingFrame:ClearInertialScrolling()
```

- Tags: Roblox script security, Capabilities: UI

### GetSampledInertialVelocity

```luau
ScrollingFrame:GetSampledInertialVelocity(): Vector2
```

- Tags: Roblox script security, Capabilities: UI

### GetScrollVelocity

```luau
ScrollingFrame:GetScrollVelocity(): Vector2
```

- Tags: Capabilities: UI

Returns a [`Vector2`](https://rapi.sleaze.dev/index/types/Vector2.md) representing the current inertial scroll velocity after the user stops their input.

Returns: The current inertial scroll velocity in pixels per second on each axis, or `(0, 0)` if the frame is not coasting.

### ResetScrollVelocity

```luau
ScrollingFrame:ResetScrollVelocity()
```

- Tags: Capabilities: UI

Resets the inertial scroll velocity of the [`ScrollingFrame`](https://rapi.sleaze.dev/classes/ScrollingFrame.md) to `0` on both axes.

### ScrollToTop

```luau
ScrollingFrame:ScrollToTop()
```

- Tags: Roblox script security, Capabilities: UI

## Inherited members

- From [GuiObject](https://rapi.sleaze.dev/classes/GuiObject.md): `SelectionImageObject`, `ClipsDescendants`, `Draggable`, `Active`, `AnchorPoint`, `AutomaticSize`, `BackgroundColor3`, `BackgroundTransparency`, `BorderColor3`, `BorderMode`, `BorderSizePixel`, `InputSink`, `Interactable`, `LayoutOrder`, `Position`, `Rotation`, `SelectionRect2D`, `Sink`, `Size`, `SizeConstraint`, `Visible`, `ZIndex`, `BackgroundColor`, `BorderColor`, `Transparency`, `DragBeginConnectionCount`, `DragStoppedConnectionCount`, `MouseEnterConnectionCount`, `MouseLeaveConnectionCount`, `MouseMovedConnectionCount`, `MouseWheelBackwardConnectionCount`, `MouseWheelForwardConnectionCount`, `NextSelectionDown`, `NextSelectionLeft`, `NextSelectionRight`, `NextSelectionUp`, `Selectable`, `SelectionOrder`, `GuiState`, `TweenPositionInternal`, `TweenSizeAndPositionInternal`, `TweenSizeInternal`, `TweenPosition`, `TweenSize`, `TweenSizeAndPosition`, `InputBegan`, `InputChanged`, `InputEnded`, `MouseEnter`, `MouseLeave`, `MouseMoved`, `MouseWheelBackward`, `MouseWheelForward`, `SelectionGained`, `SelectionLost`, `TouchLongPress`, `TouchPan`, `TouchPinch`, `TouchRotate`, `TouchSwipe`, `TouchTap`, `DragBegin`, `DragStopped`
- From [GuiBase2d](https://rapi.sleaze.dev/classes/GuiBase2d.md): `AbsolutePosition`, `AbsoluteRotation`, `AbsoluteSize`, `ActiveQueryNames`, `ReplicatedInsertionOrder`, `ClippedRect`, `IsNotOccluded`, `RawRect2D`, `TotalGroupScale`, `AutoLocalize`, `RootLocalizationTable`, `Localize`, `SelectionBehaviorDown`, `SelectionBehaviorLeft`, `SelectionBehaviorRight`, `SelectionBehaviorUp`, `SelectionGroup`, `SelectionChanged`
- 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`
