Expand description
Button component
Provides clickable button widgets for UI interactions.
§Structure
Button- The button widget structconstructors- Constructor functions (new, builder methods)methods- Instance methods (render,is_clicked, etc.)traits- Trait implementations (Default)render_title_with_buttons- Standalone function for rendering title with buttons
§Example
use ratatui::style::{Color, Style};
use ratatui_toolkit::Button;
let button = Button::new("Click Me")
.normal_style(Style::default().fg(Color::White))
.hover_style(Style::default().fg(Color::Yellow));§Click Detection
Buttons track their own area for click detection. Use Button::is_clicked to
check if a click occurred within the button’s bounds after rendering.
Modules§
- constructors
- methods
- render_
title_ with_ buttons - traits
- Trait implementations for the Button widget.
Structs§
- Button
- A clickable button widget for the UI