Skip to contents

The slider already updates glass live on the client. This observer optionally echoes the value through update_glass_theme() so other clients / server state stay aligned.

Usage

observe_glass_intensity(input, session, inputId = "glass_intensity")

Arguments

input

The server input object.

session

A Shiny session object.

inputId

Input id of the intensity slider.

Value

An shiny::observeEvent() observer (invisibly).

Examples

if (interactive()) {
  library(shiny)
  ui <- fluidPage(
    theme = glass_theme(intensity = 0.5),
    glass_intensity_slider()
  )
  server <- function(input, output, session) {
    observe_glass_intensity(input, session)
  }
  shinyApp(ui, server)
}