ratatui_toolkit/primitives/pane/
mod.rs

1//! Pane component
2//!
3//! Provides styled panel components with title, icon, padding, and optional footer.
4
5pub mod constructors;
6pub mod methods;
7pub mod traits;
8
9use ratatui::style::Style;
10use ratatui::text::Line;
11use ratatui::widgets::BorderType;
12
13/// A styled panel component with title, icon, padding, and optional footer
14#[derive(Clone, Debug)]
15pub struct Pane<'a> {
16    /// Title text for pane
17    pub title: String,
18
19    /// Icon to display before the title (optional)
20    pub icon: Option<String>,
21
22    /// Padding around the content (top, right, bottom, left)
23    pub padding: (u16, u16, u16, u16),
24
25    /// Simple text footer (optional) - displayed in border
26    pub text_footer: Option<Line<'a>>,
27
28    /// Height of the footer area when using widget footers
29    pub footer_height: u16,
30
31    /// Styling
32    pub border_style: Style,
33    pub border_type: BorderType,
34    pub title_style: Style,
35    pub footer_style: Style,
36}