Skip to content

Class · inherits GuiObject

ScrollingFrame

Official docs ↗

ScrollingFrame is a special Frame type with built-in scrolling interactivity and different ways to customize how the scrolling works.

About ScrollingFrame

ScrollingFrame is a special Frame type with built-in scrolling interactivity and different ways to customize how the scrolling works.

Properties 20

  • AbsoluteCanvasSize: Vector2ReadOnlyNotReplicatedThe size of the area that is scrollable, in offsets.

    The size of the area that is scrollable, in offsets. This property is set to the maximum of the CanvasSize property and the size of the children if AutomaticCanvasSize is set to something other than AutomaticSize.None.

  • AbsoluteWindowSize: Vector2ReadOnlyNotReplicatedThe size of the frame, in offsets, without the scroll bars.

    The size of the frame, in offsets, without the scroll bars. This read-only property represents the visible content area of the ScrollingFrame: the frame's AbsoluteSize minus the space occupied by any currently visible scroll bar gutters (ScrollBarThickness). If no scroll bars are visible, this equals the frame's absolute size.

  • AutomaticCanvasSize: AutomaticSizeDetermines whether ScrollingFrame.CanvasSize is resized based on child content.

    This property is used to automatically size parent UI objects based on the size of its descendants. You can use this property to dynamically add text and other content to a ScrollingFrame at edit or run time and the size will adjust to fit that content.

    When this property is set to an AutomaticSize value other than None, AbsoluteCanvasSize may resize depending on its child content.

  • BottomImage: ContentIdImage 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).

    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: ContentThe Content-typed equivalent of BottomImage.

    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). Only supports asset URIs as textures.

  • CanvasPosition: Vector2Reflects the current positional offset of the canvas within the frame, in pixels, and sets the position of scroll bars accordingly.

    Reflects the current positional offset of the canvas within the frame, in pixels, and sets the position of scroll bars accordingly. Note that this property doesn't do anything if scroll bars aren't visible.

  • CanvasSize: UDim2Determines the size of the scrollable area.

    Determines the size of the scrollable area. For an adaptive alternative based on the overall size of children within the ScrollingFrame, consider using AutomaticCanvasSize.

  • ElasticBehavior: ElasticBehaviorDetermines if and when elastic scrolling is allowed on touch‑enabled devices.

    This property determines if and when elastic scrolling is allowed on touch‑enabled devices. Defaults to WhenScrollable.

  • HorizontalScrollBarInset: ScrollBarInsetIndicates whether CanvasSize is inset by ScrollBarThickness on the horizontal axis.

    Indicates whether the scrollable canvas is inset by ScrollBarThickness to account for the horizontal scroll bar. Because the horizontal scroll bar occupies space along the bottom edge, this inset reduces the canvas height. Defaults to ScrollBarInset.None.

    • None — the canvas is never inset; content may be obscured behind the horizontal scroll bar when it is visible.
    • ScrollBar — the canvas is inset only while the horizontal scroll bar is visible.
    • Always — the canvas is always inset regardless of whether the horizontal scroll bar is visible.
  • MidImage: ContentIdImage which spans the area between TopImage and BottomImage (rotated 90° counterclockwise for a horizontal scroll bar).

    Image which spans the area between TopImage and BottomImage (rotated 90° counterclockwise for a horizontal scroll bar). This image automatically scales to fill the space between the cap segments.

  • MidImageContent: ContentThe Content-typed equivalent of MidImage.

    Image which spans the area between TopImageContent and BottomImageContent (rotated 90° counterclockwise for a horizontal scroll bar). This image automatically scales to fill the space between the cap segments. Only supports asset URIs as textures.

  • ScrollBarImageColor3: Color3Determines how the rendered scroll bar images are colorized.

    Determines how the scroll bar images (TopImage, MidImage, BottomImage) are colorized. When set to white, no colorization occurs. This property is useful for reusing image assets; if the source images are completely white with transparency, you can set the color of the entire scroll bar at once.

  • ScrollBarImageTransparency: floatDetermines the opacity of the scroll bar images.

    Determines the opacity of the scroll bar images (TopImage, MidImage, BottomImage). A value of 0 is completely opaque and a value of 1 is completely transparent (invisible).

  • ScrollBarThickness: intThickness of the scroll bar in pixels; applies to both horizontal and vertical scroll bars.

    Thickness of the scroll bar in pixels; applies to both horizontal and vertical scroll bars. If set to 0, no scroll bars are rendered.

  • ScrollingDirection: ScrollingDirectionDetermines the direction(s) in which scrolling is allowed.

    This property determines the direction(s) in which scrolling is allowed. If scrolling is disallowed in a direction, the associated scroll bar will not appear. Defaults to ScrollingDirection.XY.

  • ScrollingEnabled: booleanDetermines whether scrolling is allowed on the frame.

    Determines whether scrolling is allowed on the frame. If false, no scroll bars will be rendered.

  • TopImage: ContentIdImage 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).

    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: ContentThe Content-typed equivalent of TopImage.

    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). Only supports asset URIs as textures. Defaults to the built-in scroll bar top cap texture (rbxasset://textures/ui/Scroll/scroll-top.png).

  • VerticalScrollBarInset: ScrollBarInsetIndicates whether CanvasSize is inset by ScrollBarThickness on the vertical axis.

    Indicates whether the scrollable canvas is inset by ScrollBarThickness to account for the vertical scroll bar. Because the vertical scroll bar occupies space along a side edge, this inset reduces the canvas width. Defaults to ScrollBarInset.None.

    • None — the canvas is never inset; content may be obscured behind the vertical scroll bar when it is visible.
    • ScrollBar — the canvas is inset only while the vertical scroll bar is visible.
    • Always — the canvas is always inset regardless of whether the vertical scroll bar is visible.
  • VerticalScrollBarPosition: VerticalScrollBarPositionIndicates whether the vertical scroll bar is positioned to the left or right of the canvas.

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

Methods 2

  • GetScrollVelocity() → Vector2Returns a Vector2 representing the current inertial scroll velocity after the user stops their input.

    Returns a Vector2 representing the current inertial scroll velocity after the user stops their input, for example lifts their finger off the ScrollingFrame on a touch-enabled device.

    Note that this method may only produce noticable data on an actual device or in an emulated scenario from Studio's Device Emulator.

  • ResetScrollVelocity() → ()Resets the inertial scroll velocity of the ScrollingFrame to 0 on both axes.

ScrollingFrame also has every member of GuiObject. Deprecated and Roblox-only members are hidden.

Reference text from the Roblox Creator Documentation, licensed CC BY 4.0, reorganized by rbxtoolshub.com · Studio 0.743.0.7431133.