Skip to main content

overlay_scrollbar

Function overlay_scrollbar 

Source
pub fn overlay_scrollbar(theme: &Theme, status: Status) -> Style
Expand description

Overlay scrollbar — invisible at rest, thin rounded thumb on hover/drag.

  • Active / not hovered: completely invisible — the scrollbar takes no visual space and the content fills the full width.
  • Hovered (cursor anywhere over the scrollable, not just the rail): a thin, semi-transparent rounded thumb floats over the right edge.
  • Dragged: same thumb, slightly more opaque for feedback.

Apply with a 6 px Direction::Vertical width so there is a small grab target even though the rendered thumb is only 4 px wide.