ratatui_kit/components/
mod.rs

1// 适配器组件,用于桥接外部 widget 或自定义渲染逻辑。
2pub mod adapter;
3pub use adapter::*;
4// Fragment 透明容器组件,无额外布局节点,常用于包裹多个子元素。
5pub mod fragment;
6pub use fragment::*;
7// 视图容器组件,支持布局、嵌套、样式等,常用于包裹和组织子组件。
8pub mod view;
9pub use view::*;
10// 边框组件,为内容添加可定制的边框和标题。
11pub mod border;
12pub use border::*;
13// 模态框组件,支持弹窗、遮罩等交互场景。
14pub mod modal;
15pub use modal::*;
16// 滚动视图组件,支持内容滚动,适合长列表、文档阅读等。
17pub mod scroll_view;
18pub use scroll_view::*;
19// 上下文提供者组件,实现依赖注入和全局状态共享。
20mod context_provider;
21pub use context_provider::*;
22// 中心布局组件,用于居中布局,适合内容居中显示。
23pub mod center;
24pub use center::*;
25
26// 文本组件,用于显示文本内容,支持样式、超链接等。
27pub mod text;
28pub use text::*;
29
30// 定位组件,支持绝对定位,适合复杂布局需求。
31pub mod positioned;
32pub use positioned::*;
33
34#[cfg(feature = "input")]
35pub mod input;
36#[cfg(feature = "input")]
37pub use input::*;
38#[cfg(feature = "input")]
39pub use tui_input;
40
41#[cfg(feature = "tree")]
42pub mod tree_select;
43#[cfg(feature = "tree")]
44pub use tree_select::*;
45#[cfg(feature = "tree")]
46pub use tui_tree_widget;
47
48#[cfg(feature = "textarea")]
49// 多行文本输入组件,支持光标、占位符、行号等,适合编辑器、表单等场景。
50pub mod textarea;
51#[cfg(feature = "textarea")]
52pub use textarea::*;
53
54#[cfg(feature = "router")]
55// 路由组件,支持页面跳转、参数、嵌套路由等,适合多页面终端应用。
56pub mod router;
57#[cfg(feature = "router")]
58pub use router::*;