A breadcrumb navigation trail. Compose with shad_breadcrumb_item(),
shad_breadcrumb_separator() and shad_breadcrumb_ellipsis(), or pass a
named items vector for the common case.
Usage
shad_breadcrumb(..., items = NULL, class = NULL)
shad_breadcrumb_item(label, href = NULL, current = FALSE)
shad_breadcrumb_separator()
shad_breadcrumb_ellipsis()Arguments
- ...
Breadcrumb parts. Ignored when
itemsis supplied.- items
Optional named character vector: names are labels, values are hrefs. Use
NAas the href to mark the current page. Separators are inserted automatically.- class
Extra CSS classes.
- label
Item label.
- href
Link URL; omit for a non-link item.
- current
If
TRUE, renders the current-page item (non-link).
See also
Other shadshiny tier-1 components:
shad_alert(),
shad_aspect_ratio(),
shad_avatar(),
shad_badge(),
shad_button(),
shad_button_group(),
shad_card(),
shad_code_block(),
shad_empty(),
shad_item(),
shad_kbd_group(),
shad_label(),
shad_progress(),
shad_scroll_fade(),
shad_separator(),
shad_shimmer(),
shad_skeleton(),
shad_spinner(),
shad_table(),
shad_typography
Examples
shad_breadcrumb(items = c(Home = "/", Docs = "/docs", Breadcrumb = NA))
#> <nav class="shad-breadcrumb" aria-label="Breadcrumb">
#> <ol class="shad-breadcrumb__list">
#> <li class="shad-breadcrumb__item">
#> <a class="shad-breadcrumb__link" href="/">Home</a>
#> </li>
#> <li class="shad-breadcrumb__separator" role="presentation" aria-hidden="true">
#> <svg class="shad-icon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="m9 18 6-6-6-6"/></svg>
#> </li>
#> <li class="shad-breadcrumb__item">
#> <a class="shad-breadcrumb__link" href="/docs">Docs</a>
#> </li>
#> <li class="shad-breadcrumb__separator" role="presentation" aria-hidden="true">
#> <svg class="shad-icon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="m9 18 6-6-6-6"/></svg>
#> </li>
#> <li class="shad-breadcrumb__item">
#> <span class="shad-breadcrumb__page" role="link" aria-disabled="true" aria-current="page">Breadcrumb</span>
#> </li>
#> </ol>
#> </nav>