R/wa_scroller.R

Defines functions wa_scroller

Documented in wa_scroller

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

#' Create a `wa-scroller` component
#'
#' Generated wrapper for the Web Awesome `wa-scroller` 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 lang String. Optional Web Awesome attribute.
#' @param orientation Enumerated string. Allowed values: `horizontal`,
#' `vertical`. Default: `horizontal`. The scroller's orientation.
#' @param without_scrollbar Boolean. Default: `FALSE`. Removes the visible
#' scrollbar.
#' @param without_shadow Boolean. Default: `FALSE`. Removes the shadows.
#'
#' @section Shiny Bindings:
#' None.
#'
#' @return An HTML tag for the component.
#'
#' @export
wa_scroller <- function(
  ...,
  id = NULL,
  class = NULL,
  style = NULL,
  dir = NULL,
  lang = NULL,
  orientation = NULL,
  without_scrollbar = NULL,
  without_shadow = NULL
) {
  children <- list(...)

  if (!is.null(orientation)) {
    orientation <- .wa_match_arg(
      orientation,
      "orientation",
      c(
        "horizontal",
        "vertical"
      )
    )
  }

  attrs <- .wa_normalize_attrs(
    list(
      "id" = id,
      "class" = class,
      "style" = style,
      "dir" = dir,
      "lang" = lang,
      "orientation" = orientation,
      "without-scrollbar" = without_scrollbar,
      "without-shadow" = without_shadow
    ),
    boolean_names = c("without-scrollbar", "without-shadow"),
    boolean_arg_names = c(
      "without-scrollbar" = "without_scrollbar",
      "without-shadow" = "without_shadow"
    )
  )

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