Tui-scrollview
tui-scrollview
is a library for creating scrollable views in Ratatui.
Installation
cargo add tui-scrollview
Usage
use iter;
use ;
use ;
Example
See scrollview.rs
Run this with
cargo run --example scrollview
TODO
- Clamp scroll state to buffer area
- Add scrollbar
- Add example
- Conditionally show scrollbar
- Add demo GIF
- Fix scrollbar size (Ratatui bug?)
- Change offset to use
Position
once Ratatui PR #790 is released (this will be breaking change for the ScrollViewState)
License
Copyright (c) 2024 Josh McKinney
This project is licensed under either of:
- Apache License, Version 2.0 (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
- MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT)
at your option.
Contribution
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.
See CONTRIBUTING.md.