A versatile widget list for Ratatui
This crate provides a stateful widget [ListView] implementation for Ratatui. The associated [ListState], offers functionalities such as navigating to the next and previous items.
The list view support both horizontal and vertical scrolling.
Configuration
The [ListView] can be customized with the following options:
-
[
ListView::scroll_axis]: Specifies whether the list is vertically or horizontally scrollable. -
[
ListView::scroll_padding]: Specifies whether content should remain visible while scrolling, ensuring that a specified amount of padding is preserved above/below the selected item during scrolling. -
[
ListView::infinite_scrolling]: Allows the list to wrap around when scrolling past the first or last element. -
[
ListView::style]: Defines the base style of the list. -
[
ListView::block]: Optional outer block surrounding the list.
Example
use *;
use ;
For more examples see tui-widget-list.
Documentation
Demos
Demo

Infinite scrolling, scroll padding, horizontal scrolling

License: MIT