Module button

Module button 

Source
Expand description

Button component

Provides clickable button widgets for UI interactions.

§Structure

§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