| Crates.io | tui-chat |
| lib.rs | tui-chat |
| version | 0.2.1 |
| created_at | 2025-09-30 23:43:42.045336+00 |
| updated_at | 2025-10-03 10:44:07.927799+00 |
| description | Terminal chat widgets for ratatui applications |
| homepage | |
| repository | https://github.com/emincangencer/tui-chat |
| max_upload_size | |
| id | 1861857 |
| size | 58,610 |
A Rust crate providing terminal chat widgets for ratatui applications. Includes ChatArea for displaying messages and InputArea for multiline text input, along with a complete ChatApp for quick prototyping.
Add the crate to your project:
cargo add tui-chat
Or manually add to your Cargo.toml:
[dependencies]
tui-chat = "0.2.0"
This will automatically include all required dependencies (ratatui, crossterm, textwrap, arboard).
use tui_chat::{ChatArea, InputArea, ChatMessage};
let mut chat_area = ChatArea::new();
let mut input_area = InputArea::new();
// Add a message
chat_area.add_message(ChatMessage {
sender: "User".to_string(),
content: "Hello!".to_string(),
});
// In your render loop
chat_area.render(frame, chat_rect);
input_area.render(frame, input_rect);
To see a full chat application, run the included example:
cargo run --example chat_app
This project is licensed under the MIT License.