Skip to contents

Browse the public components and copy the examples into a Shiny UI with library(shiny), library(glasstabs) and useGlassTabs() at the root. The following code is for 0.4.2. The pkgdown page is static; launch the example for actual rendered widgets, theme changes and interactions.

Closable glass tabs in a compact workspace
Closable glass tabs in a compact workspace
glassTabsUI("tabs",
  glassTabPanel("data", "Data", p("Data")),
  glassTabPanel("preview", "Preview", p("Preview"), closable = TRUE),
  style = "segmented", indicator = "solid", theme = "auto",
  transition = "none", glass_strength = 0.25)

Single and multiple selections

Multi-select with colored choices and a selection count
Multi-select with colored choices and a selection count
glassSelect("dataset", c("Providers", "Population"), width = "240px")
glassMultiSelect("region", c("North", "South"), width = "100%")

Switch, radio and checkbox group

Glass switch, radio buttons, and checkbox group
Glass switch, radio buttons, and checkbox group
glassSwitch("enabled", "Enable filtering", TRUE, theme = "auto")
glassRadioGroup("mode", "Mode", c("Edit", "Preview"), inline = TRUE)
glassCheckboxGroup("fields", "Fields", c("Name", "County"),
                   selected = "Name", inline = TRUE)

Try each component in a real app

runGlassExample("final-features")

Watch the demos

Open the dashboard workflow recording.

Open the configurable navigation recording.

See navigation, single-select, multi-select, form inputs and the example gallery. The built-in example renders these controls together in a working Shiny app.