Drop-in shiny::selectInput() that applies window.shinyglass.setScene()
immediately. Pair with observe_glass_scene() so the server stays in sync.
Usage
glass_scene_input(
inputId = "glass_scene",
label = "Wallpaper scene",
selected = "default",
choices = glass_scenes(),
width = NULL
)Arguments
- inputId
The
inputslot that will be used to access the value.- label
Display label (or
NULLfor none).- selected
Initially selected scene id.
- choices
Named character vector. Defaults to
glass_scenes().- width
The width of the input (e.g.
"100%").
Value
A shiny::selectInput() tag marked for client bindings.
See also
glass_scenes(), observe_glass_scene(), update_glass_theme()
Other glass controls:
glass_accent_input(),
glass_intensity_slider(),
glass_plot_surface_input(),
glass_preset_input(),
glass_resolved_preset(),
glass_system_colors(),
glass_theme_toggle(),
observe_glass(),
observe_glass_accent(),
observe_glass_intensity(),
observe_glass_plot_surface(),
observe_glass_preset_input(),
observe_glass_scene(),
observe_glass_theme_toggle()
Examples
glass_scene_input(selected = "harbor")
#> <div class="form-group shiny-input-container">
#> <label class="control-label" id="glass_scene-label" for="glass_scene">Wallpaper scene</label>
#> <div>
#> <select id="glass_scene" class="shiny-input-select glass-scene-input" data-glass-scene-input="glass_scene"><option value="default">Default orbs</option>
#> <option value="tahoe">Lake Tahoe mist</option>
#> <option value="dusk">Warm dusk</option>
#> <option value="mesh">Soft RGB mesh</option>
#> <option value="aurora">Aurora veil</option>
#> <option value="harbor" selected>Harbor morning</option>
#> <option value="grove">Orchard grove</option></select>
#> <script type="application/json" data-for="glass_scene" data-nonempty="">{"plugins":["selectize-plugin-a11y"]}</script>
#> </div>
#> </div>