Skip to main content

Module components

Module components 

Source
Expand description

UI Components

This module provides reusable interactive UI components that extend ratatui.

§Components

§Interactive Components

  • CheckBox - Toggleable checkbox with label
  • Input - Text input field with cursor
  • TextArea - Multi-line text input with cursor and scrolling
  • Button - Various button styles
  • Select - Dropdown select box with popup options
  • ContextMenu - Right-click popup menu with actions and submenus
  • MenuBar - Horizontal menu bar with dropdown menus (File, Edit, View, Help style)
  • PopupDialog - Container for popup dialogs

§Display Components

  • AnimatedText - Animated text with color effects (pulse, wave, rainbow)
  • ParagraphExt - Extended paragraph with word-wrapping and scrolling
  • Toast - Toast notifications with auto-dismiss
  • Progress - Progress bar with label and percentage
  • MarqueeText - Scrolling text for long content in limited space
  • Spinner - Animated loading/processing indicator with multiple styles
  • ListPicker - Scrollable list with selection
  • TreeView - Collapsible tree view with selection
  • FileExplorer - File browser with multi-select
  • Accordion - Collapsible sections with single or multiple expansion
  • Breadcrumb - Hierarchical navigation path with ellipsis collapsing

§Layout Components

  • TabView - Tab bar with switchable content panes
  • SplitPane - Resizable split pane with drag-to-resize divider

§Utility Components

§Dialog Components

  • HotkeyDialog - Hotkey configuration dialog with search and categories

§Viewer Components

  • LogViewer - Scrollable log viewer with search
  • DiffViewer - Diff viewer with unified and side-by-side modes
  • StepDisplay - Multi-step progress display

Re-exports§

pub use accordion::Accordion;
pub use accordion::AccordionMode;
pub use accordion::AccordionState;
pub use accordion::AccordionStyle;
pub use accordion::calculate_height as accordion_height;
pub use accordion::handle_accordion_key;
pub use accordion::handle_accordion_mouse;
pub use animated_text::AnimatedText;
pub use animated_text::AnimatedTextEffect;
pub use animated_text::AnimatedTextState;
pub use animated_text::AnimatedTextStyle;
pub use animated_text::WaveDirection;
pub use breadcrumb::Breadcrumb;
pub use breadcrumb::BreadcrumbAction;
pub use breadcrumb::BreadcrumbItem;
pub use breadcrumb::BreadcrumbState;
pub use breadcrumb::BreadcrumbStyle;
pub use breadcrumb::get_hovered_index as breadcrumb_hovered_index;
pub use breadcrumb::handle_breadcrumb_key;
pub use breadcrumb::handle_breadcrumb_mouse;
pub use button::Button;
pub use button::ButtonAction;
pub use button::ButtonState;
pub use button::ButtonStyle;
pub use button::ButtonVariant;
pub use checkbox::CheckBox;
pub use checkbox::CheckBoxAction;
pub use checkbox::CheckBoxState;
pub use checkbox::CheckBoxStyle;
pub use container::DialogConfig;
pub use container::DialogFocusTarget;
pub use container::DialogState;
pub use container::PopupDialog;
pub use context_menu::ContextMenu;
pub use context_menu::ContextMenuAction;
pub use context_menu::ContextMenuItem;
pub use context_menu::ContextMenuState;
pub use context_menu::ContextMenuStyle;
pub use context_menu::calculate_menu_height;
pub use context_menu::handle_context_menu_key;
pub use context_menu::handle_context_menu_mouse;
pub use context_menu::is_context_menu_trigger;
pub use menu_bar::Menu;
pub use menu_bar::MenuBar;
pub use menu_bar::MenuBarAction;
pub use menu_bar::MenuBarClickTarget;
pub use menu_bar::MenuBarItem;
pub use menu_bar::MenuBarState;
pub use menu_bar::MenuBarStyle;
pub use menu_bar::calculate_dropdown_height as menu_bar_dropdown_height;
pub use menu_bar::calculate_menu_bar_height;
pub use menu_bar::handle_menu_bar_key;
pub use menu_bar::handle_menu_bar_mouse;
pub use diff_viewer::DiffData;
pub use diff_viewer::DiffHunk;
pub use diff_viewer::DiffLine;
pub use diff_viewer::DiffLineType;
pub use diff_viewer::DiffViewMode;
pub use diff_viewer::DiffViewer;
pub use diff_viewer::DiffViewerAction;
pub use diff_viewer::DiffViewerState;
pub use diff_viewer::DiffViewerStyle;
pub use diff_viewer::handle_diff_viewer_key;
pub use diff_viewer::handle_diff_viewer_mouse;
pub use file_explorer::EntryType;
pub use file_explorer::FileEntry;
pub use file_explorer::FileExplorer;
pub use file_explorer::FileExplorerState;
pub use file_explorer::FileExplorerStyle;
pub use hotkey_dialog::CategoryClickRegion;
pub use hotkey_dialog::HotkeyCategory;
pub use hotkey_dialog::HotkeyClickRegion;
pub use hotkey_dialog::HotkeyDialog;
pub use hotkey_dialog::HotkeyDialogAction;
pub use hotkey_dialog::HotkeyDialogState;
pub use hotkey_dialog::HotkeyDialogStyle;
pub use hotkey_dialog::HotkeyEntryData;
pub use hotkey_dialog::HotkeyFocus;
pub use hotkey_dialog::HotkeyProvider;
pub use hotkey_dialog::handle_hotkey_dialog_key;
pub use hotkey_dialog::handle_hotkey_dialog_mouse;
pub use hotkey_dialog::is_close_key as hotkey_is_close_key;
pub use hotkey_dialog::is_navigation_key as hotkey_is_navigation_key;
pub use hotkey_dialog::render_hotkey_dialog;
pub use input::Input;
pub use input::InputAction;
pub use input::InputState;
pub use input::InputStyle;
pub use list_picker::ListPicker;
pub use list_picker::ListPickerState;
pub use list_picker::ListPickerStyle;
pub use log_viewer::LogViewer;
pub use log_viewer::LogViewerState;
pub use log_viewer::LogViewerStyle;
pub use log_viewer::SearchState;
pub use marquee::MarqueeMode;
pub use marquee::MarqueeState;
pub use marquee::MarqueeStyle;
pub use marquee::MarqueeText;
pub use marquee::ScrollDir;
pub use marquee::bounce_marquee;
pub use marquee::continuous_marquee;
pub use mouse_pointer::MousePointer;
pub use mouse_pointer::MousePointerState;
pub use mouse_pointer::MousePointerStyle;
pub use paragraph_ext::ParagraphExt;
pub use progress::Progress;
pub use progress::ProgressStyle;
pub use scrollable_content::ScrollableContent;
pub use scrollable_content::ScrollableContentAction;
pub use scrollable_content::ScrollableContentState;
pub use scrollable_content::ScrollableContentStyle;
pub use scrollable_content::handle_scrollable_content_key;
pub use scrollable_content::handle_scrollable_content_mouse;
pub use spinner::LabelPosition;
pub use spinner::Spinner;
pub use spinner::SpinnerFrames;
pub use spinner::SpinnerState;
pub use spinner::SpinnerStyle;
pub use select::Select;
pub use select::SelectAction;
pub use select::SelectState;
pub use select::SelectStyle;
pub use select::calculate_dropdown_height;
pub use select::handle_select_key;
pub use select::handle_select_mouse;
pub use split_pane::Orientation;
pub use split_pane::SplitPane;
pub use split_pane::SplitPaneAction;
pub use split_pane::SplitPaneState;
pub use split_pane::SplitPaneStyle;
pub use split_pane::handle_split_pane_key;
pub use split_pane::handle_split_pane_mouse;
pub use step_display::Step;
pub use step_display::StepDisplay;
pub use step_display::StepDisplayState;
pub use step_display::StepDisplayStyle;
pub use step_display::StepStatus;
pub use step_display::SubStep;
pub use step_display::calculate_height as step_display_height;
pub use tab_view::Tab;
pub use tab_view::TabPosition;
pub use tab_view::TabView;
pub use tab_view::TabViewAction;
pub use tab_view::TabViewState;
pub use tab_view::TabViewStyle;
pub use tab_view::handle_tab_view_key;
pub use tab_view::handle_tab_view_mouse;
pub use textarea::TabConfig;
pub use textarea::TextArea;
pub use textarea::TextAreaAction;
pub use textarea::TextAreaState;
pub use textarea::TextAreaStyle;
pub use textarea::WrapMode;
pub use toast::Toast;
pub use toast::ToastState;
pub use toast::ToastStyle;
pub use tree_view::FlatNode;
pub use tree_view::TreeNode;
pub use tree_view::TreeStyle;
pub use tree_view::TreeView;
pub use tree_view::TreeViewState;
pub use tree_view::get_selected_id;

Modules§

accordion
Accordion widget
animated_text
AnimatedText widget for animated text labels with color effects
breadcrumb
Breadcrumb component - Hierarchical navigation path display
button
Button component - Various button views
checkbox
CheckBox component - Toggleable checkbox with label
container
Container component - Popup dialogs with focus management
context_menu
Context Menu component - Right-click popup menu
diff_viewer
Diff viewer widget
file_explorer
File explorer widget
hotkey_dialog
Hotkey Dialog Component
input
Input component - Text input field with cursor
list_picker
List picker widget
log_viewer
Log viewer widget
marquee
MarqueeText widget
menu_bar
MenuBar component - Horizontal menu bar with dropdown menus
mouse_pointer
Mouse Pointer Indicator Widget
paragraph_ext
Extended Paragraph Widget
progress
Progress bar widget
scrollable_content
Scrollable content component
select
Select component - Dropdown select box
spinner
Spinner widget for loading/processing indicators
split_pane
Split pane layout component
step_display
Step display widget
tab_view
Tab view layout component
textarea
TextArea component - Multi-line text input with cursor
toast
Toast notification widget
tree_view
Tree view widget