R/wa_breadcrumb_item.R

Defines functions wa_breadcrumb_item

Documented in wa_breadcrumb_item

# Generated by tools/generate_components.R. Do not edit by hand.
# nolint start: object_usage_linter.

#' Create a `wa-breadcrumb-item` component
#'
#' Generated wrapper for the Web Awesome `wa-breadcrumb-item` component.
#' Generated from Web Awesome metadata.
#'
#' @param ... Child content for the component's default slot.
#' @param id Optional DOM id attribute for HTML, CSS, and JS targeting.
#' @param class Optional CSS class string.
#' @param style Optional inline CSS style string.
#' @param dir String. Optional Web Awesome attribute.
#' @param href String. Optional URL to direct the user to when the
#' breadcrumb item is activated. When set, a link will be rendered
#' internally. When unset, a button will be rendered instead.
#' @param lang String. Optional Web Awesome attribute.
#' @param rel String. Default: `noreferrer noopener`. The `rel` attribute
#' to use on the link. Only used when `href` is set.
#' @param target Enumerated string. Allowed values: `_blank`, `_parent`,
#' `_self`, `_top`. Tells the browser where to open the link. Only used
#' when `href` is set.
#' @param end An element, such as `<wa-icon>`, placed after the label.
#' @param separator The separator to use for the breadcrumb item. This
#' will only change the separator for this item. If you want to change it
#' for all items in the group, set the separator on `<wa-breadcrumb>`
#' instead.
#' @param start An element, such as `<wa-icon>`, placed before the label.
#'
#' @section Shiny Bindings:
#' None.
#'
#' @return An HTML tag for the component.
#'
#' @export
wa_breadcrumb_item <- function(
  ...,
  id = NULL,
  class = NULL,
  style = NULL,
  dir = NULL,
  href = NULL,
  lang = NULL,
  rel = NULL,
  target = NULL,
  end = NULL,
  separator = NULL,
  start = NULL
) {
  children <- list(...)
  children <- c(
    children,
    list(
      .wa_slot(end, "end")
    )
  )
  children <- c(
    children,
    list(
      .wa_slot(separator, "separator")
    )
  )
  children <- c(
    children,
    list(
      .wa_slot(start, "start")
    )
  )

  if (!is.null(target)) {
    target <- .wa_match_arg(
      target,
      "target",
      c(
        "_blank",
        "_parent",
        "_self",
        "_top"
      )
    )
  }

  attrs <- .wa_normalize_attrs(
    list(
      "id" = id,
      "class" = class,
      "style" = style,
      "dir" = dir,
      "href" = href,
      "lang" = lang,
      "rel" = rel,
      "target" = target
    ),
    boolean_names = character(),
    boolean_arg_names = NULL
  )

  do.call(
    .wa_component,
    c(
      list("wa-breadcrumb-item", .attrs = attrs),
      children
    )
  )
}
# nolint end

Try the shiny.webawesome package in your browser

Any scripts or data that you put into this service are public.

shiny.webawesome documentation built on April 22, 2026, 1:09 a.m.