Breadcrumb
April 28, 2026 · View on GitHub
Path-style indicator showing a sequence of segments separated by a glyph (default ›). Supports overflow truncation and click-to-navigate.
Constructor: NewBreadcrumb(id, class string) *Breadcrumb
Methods
Get() []string— current segmentsSet(segs []string)— replace all segmentsPush(seg string)— append a segmentPop() string— remove and return the last segment (empty if none)Truncate(index int)— keep only the firstindexsegmentsSegments() []string— alias forGet()Select(index int)— focus a specific segment; firesEvtSelectSelected() int— index of currently focused segmentSetSeparator(sep string)— change the separator glyph (default›)SetOverflow(marker string)— change the overflow marker (default…)
Events
| Event | Data | Description |
|---|---|---|
"select" | int | Focused segment changed |
"activate" | int | Enter pressed or segment clicked twice |
Notes
Flags: "focusable".
Keyboard: ←/→ move selection; Home/End jump to ends; Enter activates. When the segments don't fit in the widget's width, leading segments are replaced with the overflow marker; the focused segment is always kept visible.