| f7Checkbox | R Documentation | 
f7Checkbox creates a checkbox input.
updateF7Checkbox changes the value of a checkbox input on the client.
f7Checkbox(inputId, label, value = FALSE)
updateF7Checkbox(
  inputId,
  label = NULL,
  value = NULL,
  session = shiny::getDefaultReactiveDomain()
)
inputId | 
 The input slot that will be used to access the value.  | 
label | 
 Display label for the control, or NULL for no label.  | 
value | 
 Initial value (TRUE or FALSE).  | 
session | 
 The Shiny session object.  | 
library(shiny)
library(shinyMobile)
app <- shinyApp(
  ui = f7Page(
    f7SingleLayout(
      navbar = f7Navbar(title = "updateF7Checkbox"),
      f7Block(f7Button("update", "Toggle checkbox")),
      f7Checkbox(
        inputId = "checkbox",
        label = "Checkbox",
        value = FALSE
      )
    )
  ), server = function(input, output, session) {
    observeEvent(input$update, {
      updateF7Checkbox("checkbox", value = !input$checkbox)
    })
  }
)
if (interactive() || identical(Sys.getenv("TESTTHAT"), "true")) app
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.