Bounded workbench viewport with native scrolling and token-styled scrollbars.
Install @wyrd-company/react or the Flutter package and use it directly —
your DESIGN.md does the styling.
catalog/contracts/scroll-area.ymlsource of truth · verbatim
$schema: https://thewyrdingway.dev/schemas/component-contract.schema.ymlcontractVersion: 0.1.0identity:name: ScrollAreatag: wyrd-scroll-areapackage: wyrd.component.scroll-areatitle: Scroll Areasummary: Bounded workbench viewport with native scrolling and token-styled scrollbars.relationships:related-to: - quality-parity-and-gatesclassification:category: layoutcomposition: single-slotinteractive: truetarget-strategy:react: requiredflutter: requiredsurface:properties: - name: labeltype:kind: stringrequired: truereflects: falseserializable: truesummary: Meaningful accessible name for the scrollable region. - name: orientationtype:kind: enumvalues: - vertical - horizontal - bothrequired: falsedefault: verticalreflects: trueserializable: truesummary: Axes on which native overflow scrolling is enabled.slots: - name: contentcontent: truerequired: truecardinality: one-or-manyaccepts: - content - componentsummary: Content contained by the bounded viewport.events: []states: - name: defaultsource: platformsummary: Vertically scrollable viewport. - name: horizontalsource: propertysummary: Horizontally scrollable viewport. - name: bothsource: propertysummary: Viewport scrollable on both axes. - name: focus-visiblesource: platformsummary: Keyboard-visible focus on the scrollable region.parts: - name: rootsummary: Focusable, labelled scroll viewport.slots: - contenttokens:scrollbar:thumb-color: color.outlinetrack-color: color.surfacethickness: 8pxradius: rounded.fullmessages: []obligations:accessibility:role: regionname: Label property provides the required accessible name.keyboard: - Tab reaches the scrollable region even when its content has no focusable descendants. - Platform scrolling keys scroll the focused region using native behavior.semantics: - Web projections set role=region, tabindex=0, and aria-label from the required label property. - Flutter exposes a labelled, focusable semantics container around the native scrollable. - The accessible name must be meaningful and unique within the page or view.behavior:model: statelessinteractions: - Scrolling uses platform-native overflow and input handling; implementations do not simulate scrolling with pointer or wheel JavaScript. - Orientation enables vertical overflow, horizontal overflow, or both axes. - Horizontal scrolling and scrollbar placement follow the resolved text direction.hostEffects: []conditions: - rtl - density-compact - text-expansionsdui:status: blockedserializableProperties: []serializableSlots: []eventBindings: []notes: Scroll Area is workbench chrome, not a Layout DSL node; native viewport behavior and host sizing remain implementation concerns.examples: - name: vertical-panestate: defaultproperties:label: Project filesorientation: verticalslots:content: design-system | catalog | studio | website | brand | product | references | worktrees - name: horizontal-timelinestate: horizontalproperties:label: Timelineorientation: horizontalslots:content: Discover | Specify | Build | Validate | Publish | Observe | Refine - name: canvasstate: bothproperties:label: Diagram canvasorientation: bothslots:content: Tokens | Contracts | Runtime | React | Flutter | Studio | Documentation | Validationoverrides:react:slots:content: childrenflutter:slots:content: child
01
Examples
Generated from the contract's examples block.
Previews are the published @wyrd-company/react component, themed by the
brand's role tokens — flip the site's light/dark toggle and they follow.
Meaningful accessible name for the scrollable region.
orientation
vertical | horizontal | both
vertical
Axes on which native overflow scrolling is enabled.
03
Slots & events
Slot
Cardinality
Accepts
Summary
content
one-or-many
content, component
Content contained by the bounded viewport.
04
Tokens
The contract's token bindings. Open the shared contextual sidebar from any example;
primary swatches reflect the color you pick there. Error swatches show the active
preset's values; editing any knob switches to custom and resets error to TWW · Ink.
Binding
Token
scrollbar.thumb-color
color.outline
scrollbar.track-color
color.surface
scrollbar.thickness
8px
scrollbar.radius
rounded.full
05
States
State
Source
Summary
default
platform
Vertically scrollable viewport.
horizontal
property
Horizontally scrollable viewport.
both
property
Viewport scrollable on both axes.
focus-visible
platform
Keyboard-visible focus on the scrollable region.
06
Accessibility
From the contract's accessibility obligations. Role region; Label property provides the required accessible name.
Tab reaches the scrollable region even when its content has no focusable descendants.
Platform scrolling keys scroll the focused region using native behavior.
Web projections set role=region, tabindex=0, and aria-label from the required label property.
Flutter exposes a labelled, focusable semantics container around the native scrollable.
The accessible name must be meaningful and unique within the page or view.