Glass themes for Shiny, built on bslib. Add translucent surfaces, live light/dark switching, and adjustable glass intensity to your app.
Documentation · Theming guide · Release notes
install.packages("shinyglass")For the latest development features:
# install.packages("remotes")
remotes::install_github("ericrayanderson/shinyglass")library(shiny)
library(shinyglass)
ui <- glass_page(
title = "Hello, glass",
persist = TRUE,
scene = "tahoe",
sliderInput("n", "Bars", 5, 30, 15),
plotOutput("plot")
)
server <- function(input, output, session) {
observe_glass(input, session)
output$plot <- renderPlot({
pal <- glass_plot_colors(input = input)
barplot(seq_len(input$n), col = pal$fill, border = NA, col.axis = pal$ink)
}, bg = "transparent")
}
shinyApp(ui, server)glass_page() includes Light / Dark / Auto, the intensity
slider, and accent wells. Set persist = TRUE (the default
here) to remember those choices.
Apps may take a moment to wake up.
| Demo | Explore |
|---|---|
| Basics | Theme switching and core controls |
| Dashboard | Cards, plots, and tables |
| Inputs | Shiny input controls |
| Olympic medals | A complete dashboard |
| plotly + gt | Interactive charts and tables |
Built for Bootstrap 5 and bslib. See compatibility for supported widgets and older layouts.
More: examples · experimental Python package · testing · deployment