Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

update_action_button

Change the label or icon of an action button on the client


Description

Change the label or icon of an action button on the client

Usage

update_action_button(session, input_id, label = NULL, icon = NULL)

updateActionButton(session, inputId, label = NULL, icon = NULL)

Arguments

session

The session object passed to function given to shinyServer.

input_id

The id of the input object.

label

The label to set for the input object.

icon

The icon to set for the input object. To remove the current icon, use icon=character(0)

inputId

the same as input_id

Examples

if (interactive()){
library(shiny)
library(shiny.semantic)

ui <- semanticPage(
  actionButton("update", "Update button"),
  br(),
  actionButton("go_button", "Go")
)

server <- function(input, output, session) {
  observe({
    req(input$update)

    # Updates go_button's label and icon
    updateActionButton(session, "go_button",
                       label = "New label",
                       icon = icon("calendar"))

  })
}
shinyApp(ui, server)
}

shiny.semantic

Semantic UI Support for Shiny

v0.4.2
MIT + file LICENSE
Authors
Filip Stachura [aut], Dominik Krzeminski [cre], Krystian Igras [aut], Adam Forys [aut], Paweł Przytuła [aut], Jakub Chojna [aut], Olga Mierzwa-Sulima [aut], Ashley Baldry [ctb], Jakub Chojna [ctb], Olga Mierzwa-Sulima [ctb], Pedro Manuel Coutinho da Silva [ctb], Paweł Przytuła [ctb], Kamil Żyła [ctb], Rabii Bouhestine [ctb], Appsilon Sp. z o.o. [cph]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.