theme_selector: Themes changer dropdown

Description Usage Arguments Examples

Description

Themes changer dropdown

Usage

1
theme_selector(input_id = "theme", label = "Choose theme")

Arguments

input_id

Id of dropdown. input[[input_id]] returns the currently selected theme.

label

Dropdown label.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
if (interactive()) {
library(shiny)
 library(shiny.semantic)
  ui <- semanticPage(
    theme = "superhero",
    actionButton("action_button", "Press Me!"),
    textOutput("button_output"),
    theme_selector(),
    textOutput("theme")
  )
  server <- function(input, output, session) {
    output$button_output <- renderText(as.character(input$action_button))
    output$theme <- renderText(as.character(input$theme))
  }
  shinyApp(ui, server)
}

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