Skip to content

ScrollViewNode

Defined in: ui/src/ScrollView.ts:71

A clipped, scrollable viewport that owns a normal Yoga child subtree.

Unlike the imperative @pixi/ui wrappers, this is a true UIContainerElement: children are first-class Yoga nodes laid out by the existing layout pass, so it works identically via the React reconciler (<ScrollView>), the PanelNode builder (.scrollView()), or direct addElement. Content overflowing the viewport on the scroll axis is clipped by a mask and panned by a wheel/drag-driven offset that survives re-renders (the node instance is stable; only children are diffed).

new ScrollViewNode(props): ScrollViewNode

Defined in: ui/src/ScrollView.ts:108

ScrollViewProps

ScrollViewNode

readonly yogaNode: Node

Defined in: ui/src/ScrollView.ts:72

UIContainerElement.yogaNode

get children(): readonly UIElement[]

Defined in: ui/src/ScrollView.ts:180

readonly UIElement[]

UIContainerElement.children


get displayObject(): Container

Defined in: ui/src/ScrollView.ts:104

Container

UIContainerElement.displayObject


get maxScroll(): number

Defined in: ui/src/ScrollView.ts:204

Maximum scrollable offset (content overflow), computed each layout.

number


get scrollbarGutter(): number

Defined in: ui/src/ScrollView.ts:212

Px reserved on the scroll-cross edge for the scrollbar so content never renders under the thumb. 0 when the scrollbar is hidden.

number


get scrollOffset(): number

Defined in: ui/src/ScrollView.ts:199

Current scroll offset in pixels along the scroll axis.

number


get visible(): boolean

Defined in: ui/src/ScrollView.ts:391

boolean

set visible(v): void

Defined in: ui/src/ScrollView.ts:395

boolean

void

UIContainerElement.visible

addElement(child): void

Defined in: ui/src/ScrollView.ts:184

UIElement

void

UIContainerElement.addElement


applyLayout(): void

Defined in: ui/src/ScrollView.ts:239

void

UIContainerElement.applyLayout


destroy(): void

Defined in: ui/src/ScrollView.ts:451

void

UIContainerElement.destroy


insertElementBefore(child, before): void

Defined in: ui/src/ScrollView.ts:192

UIElement

UIElement

void

UIContainerElement.insertElementBefore


removeElement(child): void

Defined in: ui/src/ScrollView.ts:188

UIElement

void

UIContainerElement.removeElement


scrollBy(delta): void

Defined in: ui/src/ScrollView.ts:233

Scroll by a relative delta (clamped). Positive = toward content end.

number

void


scrollTo(offset): void

Defined in: ui/src/ScrollView.ts:228

Scroll to an absolute offset (clamped).

number

void


update(props): void

Defined in: ui/src/ScrollView.ts:400

Partial<ScrollViewProps>

void

UIContainerElement.update