elicitor_wizard_ratatui/lib.rs
1//! # derive-ratatui-wizard
2//!
3//! Ratatui wizard backend for derive-survey.
4//!
5//! This crate provides a rich terminal user interface (TUI) for collecting survey responses
6//! using the `ratatui` library. Questions are presented step-by-step in a wizard style with
7//! a progress bar, keyboard navigation, and visual feedback.
8//!
9//! ## Features
10//!
11//! - Rich TUI with panels and borders
12//! - Progress indicator showing current question
13//! - Keyboard navigation (arrow keys, Enter, Esc)
14//! - Real-time validation with error display
15//! - Customizable color themes
16//! - Support for all question types (input, select, multi-select, confirm, etc.)
17//!
18//! ## Example
19//!
20//! ```ignore
21//! use elicitor::Survey;
22//! use elicitor_wizard_ratatui::RatatuiBackend;
23//!
24//! #[derive(Survey)]
25//! struct User {
26//! #[ask("What is your name?")]
27//! name: String,
28//!
29//! #[ask("How old are you?")]
30//! age: i64,
31//! }
32//!
33//! fn main() -> anyhow::Result<()> {
34//! let backend = RatatuiBackend::new()
35//! .with_title("User Registration");
36//! let user = User::builder().run(backend)?;
37//! println!("Hello, {} ({} years old)!", user.name, user.age);
38//! Ok(())
39//! }
40//! ```
41
42mod backend;
43
44pub use backend::{RatatuiBackend, RatatuiError, Theme};