Reference-library parity (Radix Themes, Chakra v3):
- size: 'xs' | 'sm' | 'md' | 'lg' (Chakra t-shirt scale) → thickness
via --scroll-area-scrollbar-size.
- radius: 'none' | 'sm' | 'md' | 'lg' | 'full' (Radix Themes) → thumb
curvature via --scroll-area-thumb-radius.
- scrollbars: 'vertical' | 'horizontal' | 'both' (Radix Themes) →
recipe-level sugar that auto-mounts Scrollbar / Thumb / Corner from
the root. Explicit composition still supported (omit the prop).
Bug fix — type='scroll' + horizontal sometimes stuck hidden:
- `mounted` on ScrollAreaScrollbarProvider is now $state. Previously
a plain field, so the `shouldShow` derived didn't invalidate when
the requestFrame mount-flag flipped during the first frame.
- The reveal-on-scroll $effect now skips its first run via a
`firstRun` flag. That first run was the subscription pass with
scrollTop/scrollLeft still 0 — it was eagerly calling show() and
setting `visible=true` before `mounted` flipped. Subsequent real
scrolls then assigned visible=true again (no-op), so shouldShow
didn't re-run and the bar stayed hidden until the hide timer
expired. Now the bar only reveals on genuine scroll deltas.
Demo: chip controls for size + radius, switched to scrollbars prop
on the root (drops the explicit Scrollbar/Thumb children), eidos
snippet shows the recipe-sugar form, soma snippet still shows the
explicit Radix-style composition.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>