mirror of
https://github.com/ratatui/ratatui.git
synced 2026-03-13 17:57:55 +00:00
feat: implement Rect ops for moving Implemented `Add`, `AddAssign`, `Sub`, and `SubAssign` on `Rect` for `Offset`. This makes it possible to move rects ```rust let rect = Rect::new(1, 2, 3, 4); let moved = rect + Offset(1, 2); let moved = rect - Offset(1, 2); let moved = rect + Offset(-1, -2); ``` Additionally Rect, Size, Offset, and Position now all have MIN and MAX consts.
Widget Examples
This folder contains minimal examples for Ratatui widgets. There are meant to provide code snippets that can be copy-pasted into your application.
Tip
There are also application examples in the top-level
examplesfolder.
You can run these examples using:
cargo run -p ratatui-widgets --example example-name
Note
This folder might use unreleased code. Consider viewing the examples in the
latestbranch instead of themainbranch for code which is guaranteed to work with the released Ratatui version.















