On this page

Scrollbar

One scrollbar appearance for every area that scrolls, on top of the browser's own scrolling.

Contrast, interaction and native fallbacks

The thumb is the foreground, not the track. Keep its opaque source color visibly distinguishable from the track in both themes; validate at least 3:1 for the thumb/track pair when changing their source aliases. Hover and active use the stronger text role, not transparency or an invented shade. Text and focus around the scroller still use their own semantic foreground and focus roles. A thin bar is not the only input mechanism: preserve wheel, touch, keyboard and assistive technology access. Give an otherwise unreachable scroll viewport an appropriate accessible name and keyboard focus as needed; do not add redundant tab stops to already reachable native components.

Engines with WebKit scrollbar pseudo-elements use the token dimension for both width and height, track/corner colors, full radius and real thumb hover/active. The stylesheet selects that renderer with a feature query and leaves the standard scrollbar properties at auto, because non-auto standard properties suppress pseudo-element rendering in modern Chromium. Standards-only engines use native thin geometry and the same thumb/track colors; their API does not expose radius, corner or thumb hover/drag pseudo-elements, so hover/active colors follow the scroll host’s corresponding state. Do not claim pixel-identical geometry or simulate missing thumb events in JavaScript.

OS overlay scrollbars may keep their native visibility, hit area or geometry. Keep that platform behavior rather than forcing a persistent gutter, hiding bars or drawing a substitute. In forced-colors mode the custom paint/geometry recipe is inactive: native system scrollbar colors and dimensions remain available. Unsupported engines retain their native scrollbar. None of these fallbacks is permission for an application-owned competing scrollbar recipe.

One exception (D35): the kit’s overlay lists (Select, Combobox, Command) hide their scrollbar, and Scroll area hides the browser’s scrollbar because it draws its own bar with these tokens. They do it with their own classes, not the <style> reka-ui adds, so they look the same at both style levels of the Content Security Policy (Tools › shadcn-vue package). Every other scrolling area keeps its bar.

Tokens

TokenValueDescription
--bh-scrollbar-width{space.100}0.5remShared vertical width and horizontal height: 0.5rem, nominal 8px at the native 16px root, matching Ant tableScrollThumbSize. Standards-only browsers use their native thin metric; overlay platforms may retain platform geometry. Never duplicate per-axis or per-application sizes.
--bh-scrollbar-track{color.border}#bdbcbbDark: #454443Track in both axes, following Ant tableScrollBg = colorSplit, mapped by the Beehexa Ant factory to color.border. Theme aliases resolve in light and dark.
--bh-scrollbar-thumb{color.text.subtlest}#5f5e5bDark: #a8a6a3Foreground thumb at rest, following Ant tableScrollThumbBg = colorTextPlaceholder, mapped to color.text.subtlest. Keep the opaque thumb distinguishable from scrollbar.track; do not weaken it with opacity.
--bh-scrollbar-thumbHover{color.text}#2b2a28Dark: #eeeeedHovered thumb, following Ant tableScrollThumbBgHover = colorTextHeading, mapped to color.text. Standards-only browsers expose the scroll host hover state rather than a thumb pseudo-element.
--bh-scrollbar-thumbActive{scrollbar.thumbHover}#2b2a28Dark: #eeeeedDragged/pressed thumb; Ant sticky scrollbar uses the same colorTextHeading role for hover and active. Standards-only browsers expose the scroll host active state rather than thumb drag state.
--bh-scrollbar-corner{scrollbar.track}#bdbcbbDark: #454443Junction of horizontal and vertical native tracks. Match the track so one two-axis scroll owner has a continuous surface; no separate app color.
--bh-scrollbar-radius{radius.full}999pxFully rounded thumb and track. Ant sticky scrollbar uses borderRadius 100 to form a pill; use the canonical Beehexa full-radius alias rather than copying its fixed number.