LavaUI docs

struct ScrollView

Swift

struct ScrollView<Content> where Content : View

A clipped, scrollable container.

Generalises what EditorView already did for itself. The pieces it reuses — scissor clipping, wheel routing, scroll clamping against a viewport measured at emit time — all exist because a code editor needed them first; this is mostly extraction.

Content is laid out at its natural size and allowed to overflow, which is what YGOverflowScroll buys: without it Yoga compresses children to fit the container and there is nothing left to scroll.

Sources/LavaUI/ScrollView.swift:14

Constructors

init(_ axis: ScrollAxis = .vertical, showsIndicator: Bool = true, @ViewBuilder content: () -> Content)

Not documented.

Sources/LavaUI/ScrollView.swift:20

Properties

var axis: ScrollAxis

Not documented.

Sources/LavaUI/ScrollView.swift:15

var content: Content

Not documented.

Sources/LavaUI/ScrollView.swift:16

var dumpDetail: String { get }

Not documented.

Sources/LavaUI/ScrollView.swift:30

var showsIndicator: Bool

Draw a thin position indicator while the content overflows.

Sources/LavaUI/ScrollView.swift:18

Methods

func mountPrimitive() -> any AnyViewNode

Not documented.

Sources/LavaUI/ScrollView.swift:39

func reconcilePrimitive(_ node: any AnyViewNode) -> any AnyViewNode

Not documented.

Sources/LavaUI/ScrollView.swift:46

func structureLines(indent: Int = 0) -> [String]

Not documented.

Sources/LavaUI/ScrollView.swift:32