R/shiny-material-input.R

Defines functions material_input

Documented in material_input

#' Create a shinymaterial input
#'
#' Build a shinymaterial input.
#' @param type String. The type of input to be created.
#' @param ... Additional arguments for the input.
#' @examples
#' ##-- switch --##
#' material_input(
#'   type = "switch",
#'   input_id = "example_switch",
#'   off_label = "Off",
#'   on_label = "On",
#'   initial_value = TRUE
#' )
material_input <- function(type, ...){
  
  function_name <-
    check_material_function_name(type = type,
                                 function_type = "input")

  do.call(
    what = function_name,
    args =
      list(
        ...
      )
  )
}

Try the shinymaterial package in your browser

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

shinymaterial documentation built on Sept. 1, 2020, 1:07 a.m.