R/wa_tab.R

Defines functions wa_tab

Documented in wa_tab

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

#' Create a `wa-tab` component
#'
#' Generated wrapper for the Web Awesome `wa-tab` 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 disabled Boolean. Default: `FALSE`. Disables the tab and
#' prevents selection.
#' @param dir String. Optional Web Awesome attribute.
#' @param lang String. Optional Web Awesome attribute.
#' @param panel String. Default: `""`. The name of the tab panel this tab
#' is associated with. The panel must be located in the same tab group.
#'
#' @section Shiny Bindings:
#' None.
#'
#' @return An HTML tag for the component.
#'
#' @export
wa_tab <- function(
  ...,
  id = NULL,
  class = NULL,
  style = NULL,
  disabled = NULL,
  dir = NULL,
  lang = NULL,
  panel = NULL
) {
  children <- list(...)

  attrs <- .wa_normalize_attrs(
    list(
      "id" = id,
      "class" = class,
      "style" = style,
      "disabled" = disabled,
      "dir" = dir,
      "lang" = lang,
      "panel" = panel
    ),
    boolean_names = c("disabled"),
    boolean_arg_names = c("disabled" = "disabled")
  )

  do.call(
    .wa_component,
    c(
      list("wa-tab", .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.