| Crates.io | rat-widget |
| lib.rs | rat-widget |
| version | 3.1.0 |
| created_at | 2024-05-20 22:04:53.111136+00 |
| updated_at | 2026-01-15 22:23:07.823022+00 |
| description | ratatui widgets extended edition |
| homepage | |
| repository | https://github.com/thscharler/rat-salsa |
| max_upload_size | |
| id | 1246224 |
| size | 1,421,353 |
This crate is a part of rat-salsa.
For examples see rat-widget GitHub
This crate tries to provide an extended set of widgets with
Uses the trait defined in rat-event to implement event-handling for crossterm. All widgets are designed with other event-handlers in mind.
Uses FocusFlag defined by rat-focus internally, to mark the focused widget. This is just a passive flag, that probably can be used with other focus systems. Or you use rat-focus.
Where it makes sense the widgets implement internal scrolling. They use Scroll from rat-scrolled to render the scroll bars.
When rendering all the widgets try hard to do so without allocations and extensive copying.
Special mentions:
All the widgets are plain ratatui widgets, and implement StatefulWidget.
Event handling uses rat-event::HandleEvent. Currently, crossterm events are implemented.
There are some layout calculators beyond ratatui's Layout.
Widgets like View and Clipper move the widget-image after rendering. This breaks any areas stored in the widget-states.
See rat-reloc
A collections of uncommon widgets