checkbox: Create Semantic UI checkbox

Description Usage Arguments Details Examples

Description

Create Semantic UI checkbox

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
checkbox_input(
  input_id,
  label = "",
  type = NULL,
  is_marked = TRUE,
  style = NULL
)

checkboxInput(inputId, label = "", value = FALSE, width = NULL)

toggle(input_id, label = "", is_marked = TRUE, style = NULL)

Arguments

input_id

Input name. Reactive value is available under input[[name]].

label

Text to be displayed with checkbox.

type

Type of checkbox: NULL, 'toggle'

is_marked

Defines if checkbox should be marked. Default TRUE.

style

Style of the widget.

inputId

same as input_id

value

same as is_marked

width

The width of the input (currently not supported, but check style)

Details

The inputs are updateable by using updateCheckboxInput.

The following types are allowed:

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
if (interactive()){
  ui <- shinyUI(
    semanticPage(
      p("Simple checkbox:"),
      checkbox_input("example", "Check me", is_marked = FALSE),
      p(),
      p("Simple toggle:"),
      toggle("tog1", "My Label", TRUE)
    )
  )
  server <- function(input, output, session) {
    observeEvent(input$tog1, {
      print(input$tog1)
    })
  }
  shinyApp(ui, server)
}

Example output

Attaching package:shiny.semanticThe following object is masked frompackage:graphics:

    grid

The following object is masked frompackage:utils:

    menu

shiny.semantic documentation built on Nov. 7, 2021, 5:07 p.m.