class RatatuiRuby::Scrollbar

Visualizes the scroll state of a viewport.

Content overflows. Users get lost in long lists without landmarks. They need to know where they are and how much is left.

This widget maps your context. It draws a track and a thumb, representing your current position relative to the total length.

Overlay it on top of lists, paragraphs, or tables to provide spatial awareness.

Examples

Scrollbar.new(
  content_length: 100,
  position: 25,
  orientation: :vertical
)