Skip to content

ScrollViewNode

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

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:104

ScrollViewProps

ScrollViewNode

readonly yogaNode: Node

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

UIContainerElement.yogaNode

get children(): readonly UIElement[]

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

readonly UIElement[]

UIContainerElement.children


get displayObject(): Container

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

Container

UIContainerElement.displayObject


get maxScroll(): number

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

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

number


get scrollbarGutter(): number

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

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:191

Current scroll offset in pixels along the scroll axis.

number


get visible(): boolean

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

boolean

set visible(v): void

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

boolean

void

UIContainerElement.visible

addElement(child): void

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

UIElement

void

UIContainerElement.addElement


applyLayout(): void

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

void

UIContainerElement.applyLayout


destroy(): void

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

void

UIContainerElement.destroy


insertElementBefore(child, before): void

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

UIElement

UIElement

void

UIContainerElement.insertElementBefore


removeElement(child): void

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

UIElement

void

UIContainerElement.removeElement


scrollBy(delta): void

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

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

number

void


scrollTo(offset): void

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

Scroll to an absolute offset (clamped).

number

void


update(props): void

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

Partial<ScrollViewProps>

void

UIContainerElement.update