Shell
Shell 是 Ansiq 里最重要的应用壳层 primitive 之一。
最小示例
let app = Shell::new()
.header(StatusBar::new("ansiq · ready").build())
.body(Paragraph::new("Main area").build())
.footer(Input::new().placeholder("Type here").build())
.build();什么时候用
- 你要稳定的 header / body / footer
- 中间区域会变化,但上下区域要固定
- 你在做 monitor、explorer、session UI
关键 builder 方法
Shell::new().header(...).body(...).footer(...).style(...)
重要说明
Shell 本身就是三槽布局,不是任意数量 children 的通用容器。
去哪里看真实用法
- 活动监视器:固定 header/body/footer 的 showcase
- OpenAPI Explorer:三栏浏览器的外层壳层
Last updated on
