Where this page is in a hierarchy, each level a link back.
Installation
Components are distributed as source. Copy it and what it depends on into your project, then change it as you need:
cargo run --release --bin amenui -- add breadcrumb --to ../my-appFiles copied: src/widgets/breadcrumb.rs, src/widgets/mod.rs
Usage
use amenui::widgets::{breadcrumb};
fn view() -> El<Msg> {
breadcrumb("bc1", &["文档", "组件", "按钮"], Msg::Pick)
}API
| Functions | breadcrumb |
|---|---|
| Props | key, items (labels), msg (go to level i). |
| Files | src/widgets/breadcrumb.rs |
| Depends on | base |
| Response to fronts | nudge (a control: pushed as one piece by fronts, held and condensing at most to Look::legible_cap) |
| Recomposition | keyed labels recompose when their text changes |
Keyboard and accessibility
| States | the last item is the current page (not a link). |
|---|---|
| Keys and messages | msg(i) on a level (press, Enter); links are keyed key:i. |
On the web every control is mirrored into the page as an element with its role and name, so screen readers and the browser's own focus see it (DESIGN.md §1.14).