tui_popup/
lib.rs

1//! A popup widget for [Ratatui](https://ratatui.rs)
2//!
3//! The popup widget is a simple widget that renders a popup in the center of the screen.
4//!
5//! # Example
6//!
7//! ```rust
8//! use ratatui::prelude::*;
9//! use tui_popup::Popup;
10//!
11//! fn render_popup(frame: &mut Frame) {
12//!     let popup = Popup::new("Press any key to exit")
13//!         .title("tui-popup demo")
14//!        .style(Style::new().white().on_blue());
15//!     frame.render_widget(&popup, frame.size());
16//! }
17//! ```
18//!
19//! ![demo](https://vhs.charm.sh/vhs-q5Kz0QP3zmrBlQ6dofjMh.gif)
20//!
21//! # Feature flags
22#![doc = document_features::document_features!()]
23
24mod popup;
25mod popup_state;
26
27pub use popup::{Popup, SizedWidgetRef, SizedWrapper};
28pub use popup_state::{DragState, PopupState};