Skip to contents

Drop-in shiny::selectInput() that applies window.shinyglass.setPlotSurface() immediately. Pair with observe_glass_plot_surface() so the server stays in sync.

Usage

glass_plot_surface_input(
  inputId = "plot_surface",
  label = "Plot / table surface",
  selected = c("clear", "opaque"),
  width = NULL
)

Arguments

inputId

The input slot that will be used to access the value.

label

Display label (or NULL for none).

selected

"clear" or "opaque".

width

The width of the input (e.g. "100%").

Value

A shiny::selectInput() tag marked for client bindings.

Examples

glass_plot_surface_input(selected = "opaque")
#> <div class="form-group shiny-input-container">
#>   <label class="control-label" id="plot_surface-label" for="plot_surface">Plot / table surface</label>
#>   <div>
#>     <select id="plot_surface" class="shiny-input-select glass-plot-surface-input" data-glass-plot-surface-input="plot_surface"><option value="clear">Clear (show wallpaper)</option>
#> <option value="opaque" selected>Opaque (readable)</option></select>
#>     <script type="application/json" data-for="plot_surface" data-nonempty="">{"plugins":["selectize-plugin-a11y"]}</script>
#>   </div>
#> </div>