SwitchButton: SwitchButton

View source: R/Widget_SwitchButton.R

SwitchButtonR Documentation

SwitchButton

Description

server module for UI element that changes appearance when interacted with (e.g. clicked on) and returns which appearance (state) it is currently using

Usage

SwitchButton(
  input,
  output,
  session,
  states = list(on = list(label = "", title = "it's on", icon = icon("react"), style =
    "background-color: #1BBF1E;"), off = list(label = "", icon = icon("react"), title =
    "it's off")),
  type = "actionButton"
)

SwitchButtonUI(id)

Arguments

input

arguments necessary for use with callModule()

output

arguments necessary for use with callModule()

session

arguments necessary for use with callModule()

states

named list of arguments to be passed to type function. NOTE: Do not provide inputId.

type

type of UI element, typically "actionButton" or "actionLink"

id

id to be used to define a namespace via NS() (must match id in callModule for the server Module)

Functions

  • SwitchButton: server logic

  • SwitchButtonUI: UI elements


mjhelf/METABOseek documentation built on April 27, 2022, 5:13 p.m.