Change the value of a button input on the client

updateF7Button(
  inputId,
  label = NULL,
  color = NULL,
  fill = NULL,
  outline = NULL,
  shadow = NULL,
  rounded = NULL,
  size = NULL,
  session = shiny::getDefaultReactiveDomain()
)

Arguments

inputId

The id of the input object.

label

The contents of the button or link–usually a text label, but you could also use any other HTML, like an image or f7Icon.

color

Button color. Not compatible with outline. See here for valid colors https://framework7.io/docs/badge.html.

fill

Fill style. TRUE by default. Not compatible with outline

outline

Outline style. FALSE by default. Not compatible with fill.

shadow

Button shadow. FALSE by default. Only for material design.

rounded

Round style. FALSE by default.

size

Button size. NULL by default but also "large" or "small".

session

The Shiny session object, usually the default value will suffice.

Examples

if (interactive()) { library(shiny) library(shinyMobile) shiny::shinyApp( ui = f7Page( title = "Update f7Button", f7SingleLayout( navbar = f7Navbar(title = "Update f7Button"), f7Button( "test", "Test", color = "orange", outline = FALSE, fill = TRUE, shadow = FALSE, rounded = FALSE, size = NULL), f7Toggle("prout", "Update Button") ) ), server = function(input, output, session) { observe(print(input$test)) observeEvent(input$prout, { if (input$prout) { updateF7Button( inputId = "test", label = "Updated", color = "purple", shadow = TRUE, rounded = TRUE, size = "large" ) } }) } ) }