Scroll Area
Base Scroll Area host-projected scrolling domain, anatomy, evidence, and boundaries.
Base Scroll Area models one logical scrolling domain rather than wrapping a Web DOM scrollbar. Viewport owns the surface and reaches host scrolling through a privileged capability; Root and composed controls stay layout and projection parts.
Family and host ownership
Section titled “Family and host ownership”The canonical family contains:
- Root
1..1: anatomy and JSON-only family scope, with no offset, geometry, focus, event, or default-size ownership; - Viewport
1..1: the single logical scroll-surface owner; - Scrollbar
0..2: horizontal or vertical composed-control route; - Thumb
0..2: a feedback-only hit subregion inside Scrollbar.
Viewport exposes normalized axes, position, visible ratio, direction availability, scrolling state, and resolved projection. Raw DOM nodes, pixels, widgets, physics, and input recognizers remain host responsibilities.
system and composed are projection strategies for the same protocol. The host adapter and design-language preference resolve the default; they are not separate Base Prototypes. In composed mode the host maps normalized facts to Thumb geometry and routes movement through the existing scroll engine. Thumb owns no independent offset state, focus target, scrollbar role, or drag-and-drop semantics.
Composition-level end-follow
Section titled “Composition-level end-follow”The Scroll domain has a separate opt-in endFollow policy for append-only surfaces. A composition that declares its own privileged asScrollSurface() can configure { mode: 'while-at-end', axis: 'vertical' }, observe per-axis atEnd plus endFollow.state and endFollow.requestStatus, and send { kind: 'to-end', axis: 'vertical' } from an accessible jump control.
The host follows layout growth only while the lease is active, pauses after the reader leaves the end, coalesces rapid appends, and resumes after natural end arrival or the semantic request. It moves neither focus nor Live Region ownership and does not force smooth motion. Raw offsets, extents, targets, and pixel thresholds stay host-local.
Base Scroll Area Viewport keeps this policy off by default. Message labels, unread counts, history-prepend visual anchoring, and virtualized collections remain separate application or capability concerns.
0.2 delivery and evidence
Section titled “0.2 delivery and evidence”The stable 0.2.0 package exports @proto.ui/prototypes-base/scroll-area. Unlike the other six families on this page set, the current CLI registry has no base-scroll-area component facade; it exposes the complete brutalist-scroll-area projection instead. Base library authors can consume the public subpath directly, while app-facing generated usage currently starts from the styled projection.
T-BASE-SCROLL-AREA-0001, T-SCROLL-END-FOLLOW-0001, and the related Scroll/Move tests map the host boundary to focused module, real-browser, and cross-adapter Web conformance. This preview renders the same logical Base family through all three Web adapters; end-follow uses its separate source-bundled Chromium journey because Base Viewport does not opt in.
Lifecycle and current limitations
Section titled “Lifecycle and current limitations”The Root, Viewport, Scrollbar, and Thumb entities are draft. Current evidence covers system/composed projection, normalized facts and requests, host cleanup, composed Thumb movement, and the separate opt-in end-follow lease. Track-page press, full keyboard scrollbar semantics, RTL/writing-mode normalization, velocity, visual-anchor preservation, virtualization, and general Drag and Drop remain outside the guarantee.
References
Section titled “References”- P-BASE-SCROLL-AREA
- Parts: Viewport, Scrollbar, Thumb
- Scroll Area source
- Scroll Area evidence
- End-follow contract and evidence
- Styled projection: Brutalist Scroll Area