18 releases (4 stable)

1.1.1 Jan 29, 2025
1.0.0 Dec 29, 2024
0.27.0 Nov 1, 2024
0.12.0 Jul 3, 2024

#1110 in Command-line interface

Download history 162/week @ 2024-10-27 37/week @ 2024-11-03 12/week @ 2024-11-10 90/week @ 2024-11-17 244/week @ 2024-11-24 108/week @ 2024-12-01 229/week @ 2024-12-08 209/week @ 2024-12-15 99/week @ 2024-12-22 315/week @ 2024-12-29 143/week @ 2025-01-05 161/week @ 2025-01-12 265/week @ 2025-01-19 410/week @ 2025-01-26 322/week @ 2025-02-02 302/week @ 2025-02-09

1,327 downloads per month
Used in 14 crates (5 directly)

MIT/Apache

115KB
2K SLoC

semver stable crates.io Documentation License License

This crate is a part of rat-salsa.

For examples see rat-scrolled GitHub

Scroll

Scroll adds support for widgets that want to scroll their content.

Scroll works analogous to Block, it can be set on the widget struct where it is supported. The widget can decide which scrolling it can do, horizontal vertical or both.

Adding scroll to a widget

  • Add Scroll to the widget struct.
  • Use ScrollArea for the layout and rendering of the combination of Block+Scroll+Scroll your widget supports.
  • Add ScrollState to the widget state struct.
  • Create a ScrollAreaState for event-handling.

Dependencies

~6–16MB
~214K SLoC