Scrollbar (Scroll) Example
Demonstrates explicit scrollbars for navigation feedback.
Content overflows. Users get lost in long lists. Scrollbars provide essential spatial awareness (βHow far down am I?β) and navigation controls.
Features Demonstrated
-
Orientation: Vertical, Horizontal, and variation modes (Right/Left, Top/Bottom).
-
Styling: Custom characters for Track, Thumb, and arrows.
-
State Integration: Linking the scrollbar
positionto the content view state.
Hotkeys
-
Mouse Wheel: Scroll content (
position) -
s: Cycle Scrollbar Theme (Standard, Rounded, ASCII, Minimal)
-
o: Cycle Orientation (
orientation) -
q: Quit
Usage
ruby examples/widget_scrollbar/app.rb
Learning Outcomes
Use this example if you need toβ¦
-
Add visual scroll indicators to Lists or Tables.
-
Implement specialized inputs like sliders or volume controls.
