Scroll Area
Draft shadcn chrome over the Base host-owned scrolling domain.
Ordinary demos on this page explicitly use Shadcn Rhea, with matching examples. This does not change public compatibility defaults or imply complete browser, native-host or visual acceptance. Neutral Surface/Text atoms retain their own public semantics; the consumer composition supplies the family presentation theme.
This draft family contains Root, Viewport, Scrollbar, and Thumb. Base owns the logical scroll surface, normalized position and extent facts, scroll requests, focus participation, system/composed negotiation, and bounded Thumb control leases. The shadcn layer adds only a clipped frame, full-size rounded Viewport, slim oriented tracks, and a flexible rounded Thumb.
Viewport requests composed as a design-language preference through the privileged Scroll surface. It does not require that projection: a host without composed chrome may fall back to system under D-SCROLL-PROJECTION-0001. In either case, the host retains wheel, touch, keyboard, physics, inertia, and overscroll. The family exposes no DOM scrollbar, size, position callback, or other host-specific API.
The comparison baseline is shadcn-ui/ui revision f31ed81983653919dd4fe77aee4b4859f610f1dc, apps/v4/registry/new-york-v4/ui/scroll-area.tsx. Its Web DOM and Radix details remain comparison evidence rather than portable guarantees. Import the family from @proto.ui/prototypes-shadcn/scroll-area, or generate its React facade with proto-ui add react shadcn-scroll-area.
In the Web composed projection, the two tracks reserve a lower-right intersection that contains neither track nor Thumb. A missing or display-hidden opposite track releases that space; a track without overflow retains its authored surface while its Thumb hides. This is host-local presentation, not a separate Corner control. The reserved area stays transparent so the Root surface continues naturally without a corner tile or divider edges. The example Root and Viewport use matching rounded-md corners. A transparent thin Thumb border lets forced colors draw a visible outline without opting out of the user palette; the public family stays Root, Viewport, Scrollbar and Thumb.
Suggested acceptance path
Section titled “Suggested acceptance path”- Scroll the Viewport vertically and horizontally; confirm both axes move the same host surface.
- Drag each Thumb and confirm its axis requests host scrolling without creating a second position state.
- Tab to the Viewport and confirm its inherited focus-visible ring appears without moving or resizing the surface.
- Confirm the vertical track is 10px wide at the top/right edge and the horizontal track is 10px high at the bottom/left edge.
- Confirm both tracks have transparent two-pixel borders, the horizontal track uses column layout, and both Thumbs remain roleless and outside tab order.
- Repeat in Web Components, React, Vue, and Vue 2 at a 320px viewport with no page overflow.
The related entities are draft; this page describes the current cataloged direction, not a stable compatibility guarantee.
Install
Section titled “Install”
npx @proto.ui/cli@latest add wc shadcn-scroll-area
Replace wc with react, vue or vue2 to generate the facade for that host.
Root has no props. Scrollbar is the only configured part.
| Prop | Type | Default |
|---|---|---|
orientation | 'vertical' 'horizontal' | vertical |
orientation belongs to Scrollbar. Viewport and Thumb add no props.