lcarsCheckbox {lcars}R Documentation

LCARS checkbox

Description

An LCARS styled toggle button that can be used in place of checkboxInput.

Usage

lcarsCheckbox(
  inputId,
  label,
  value = FALSE,
  color = "atomic-tangerine",
  background_color = "#000000",
  label_color = "#FFFFFF",
  label_right = FALSE,
  width = NULL
)

Arguments

inputId

character, the input slot that will be used to access the value.

label

character, display label for the control, or NULL for no label.

value

logical, initial value.

color

Check color. Can be any color given in hex format. Named colors must be LCARS colors. See lcarsdata for options.

background_color

background color, as above.

label_color

label text color, as above.

label_right

logical, set to TRUE to right align the label.

width

a valid CSS unit.

Value

A checkbox control that can be added to a UI definition

Examples

## Only run examples in interactive R sessions
if(interactive()){
  ui <- lcarsPage(
    lcarsCheckbox("somevalue", "Some value", FALSE),
    verbatimTextOutput("value")
  )
  server <- function(input, output) {
    output$value <- renderText({ input$somevalue })
  }
  shinyApp(ui, server)
}

[Package lcars version 0.3.8 Index]