33 releases (14 breaking)

new 0.30.0 Jan 5, 2025
0.29.0 Dec 29, 2024
0.28.0 Nov 1, 2024
0.16.0 Jul 3, 2024

#837 in Command-line interface

Download history 107/week @ 2024-09-15 44/week @ 2024-09-22 50/week @ 2024-09-29 175/week @ 2024-10-06 480/week @ 2024-10-13 188/week @ 2024-10-20 149/week @ 2024-10-27 27/week @ 2024-11-03 3/week @ 2024-11-10 10/week @ 2024-11-17 5/week @ 2024-11-24 296/week @ 2024-12-01 754/week @ 2024-12-08 156/week @ 2024-12-15 38/week @ 2024-12-22 376/week @ 2024-12-29

1,387 downloads per month
Used in 3 crates (via rat-widget)

MIT/Apache

360KB
7K SLoC

semver stable crates.io Documentation License License

This crate is a part of rat-salsa.

For examples see rat-ftable GitHub.

Table widget for ratatui

Can be used as a drop-in replacement for the ratatui table. But that's not the point of this widget.

This widget uses the TableData trait instead of rendering all the table-cells and putting them into a Vec. This way rendering time only depends on the screen-size not on the size of your data.

There is a second trait TableDataIter that works better if you only have an Iterator over your data.

Caveat: If the Iterator doesn't have an efficient skip() or if you can't give the number of rows this will iterate all your data for the necessary information. This might slow down everything a bit.

image

More bullet points:

  • Row and Column scrolling.
  • Pluggable selection with TableSelection
    • Allows row/column/cell selection.
    • Row/column/cell selection + Header/Footer selection each with its own style.
  • Key/mouse handling present.

Eventhandling is currently crossterm only.

Dependencies

~7–15MB
~211K SLoC