Scroll Area
Native scrolling with custom scrollbars you can style. The content scrolls as in any scrolling element - keyboard, wheel, touch, screen readers, find in page - while thumbs, overflow hooks and fade variables are kept up to date in the browser, with no .NET call per scroll.
Vertical list
BitBhScrollAreaViewport is the native scroll container, its own scrollbars hidden;
BitBhScrollAreaScrollbar + BitBhScrollAreaThumb draw the custom one. With the default
Type="Hover" the scrollbar shows while the pointer is over the area or the content scrolls
(data-state="visible"), and hides ScrollHideDelay (600 ms) after the pointer leaves - fade it
with [data-state="hidden"]. Drag the thumb, press the track to page, or use the wheel over it. The list has
nothing focusable, so the viewport itself becomes a tab stop while it overflows: focus it and scroll with the arrow
keys. Its role="region" and aria-label say what it is.
Both axes and the corner
One scrollbar per axis: Orientation="BitBhOrientation.Horizontal" lays a scrollbar along the bottom.
Type="Always" keeps both visible, overflow or not. Where they meet, BitBhScrollAreaCorner
fills the square - sized from the scrollbars through --bit-bh-scroll-area-corner-width /
-height, which the scrollbars also stop short of. Thumb lengths follow the visible fraction
(--bit-bh-scroll-area-thumb-height / -width, at least 18px).
Fading edges, shown while scrolling
Type="Scroll" shows the scrollbar while the content scrolls (and while the pointer is on it), then hides
it ScrollHideDelay later - 900 ms here. The root carries --bit-bh-scroll-area-overflow-y-start
/ -end: the pixels of content hidden past each edge. A mask that fades over min(2.5rem, …)
of them fades an edge only where there is more to see, and no further than there is. data-overflow-y-start
/ -end (and data-scrolling, data-hovering) are there for selectors.
Focusable content, right to left
A row of filter chips scrolls sideways. The chips take the focus, so the viewport stays out of the tab order (the
browser scrolls a focused chip into view). Dir="BitBhDirection.Rtl" (or a
BitBhDirectionProvider) writes dir on the root: the content starts on the right, the thumb
moves right to left and a vertical scrollbar would sit on the left. Type="Auto" shows the scrollbar
whenever the content overflows.
Filters: none