Documentation
¶
Overview ¶
Package breadcrumbs renders an ARIA-correct breadcrumb trail.
Output structure:
<nav aria-label="Breadcrumb">
<ol class="breadcrumbs">
<li><a href="/">Home</a></li>
<li><a href="/docs/">Docs</a></li>
<li><span aria-current="page">Components</span></li>
</ol>
</nav>
The last crumb (with empty Href OR Current=true) renders as a <span> with aria-current="page". Separators are CSS-driven (no extra DOM).
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Style = registry.RegisterStyle("breadcrumbs", styleFn)
Style is the registered stylesheet handle. New's <nav> goes through Style.WrapHTML so the data-fui-comp marker is emitted and the runtime auto-loads the CSS on first appearance.
Functions ¶
Types ¶
type Config ¶
type Config struct {
Label string // optional aria-label for the <nav>; defaults to "Breadcrumb"
ID string
Class string
}
Config configures the breadcrumb nav element.
type Crumb ¶
type Crumb struct {
Text string
Href string // empty → renders as the current/last crumb
// Current overrides the empty-Href heuristic: set true on a Crumb
// with a Href if you want it marked aria-current="page" anyway
// (e.g. the page itself appearing in its own trail with a link).
Current bool
}
Crumb is one step in the breadcrumb trail.
Click to show internal directories.
Click to hide internal directories.