Wraps shiny::fluidPage() with glass_theme() and, by default, the Light /
Dark / Auto toggle, intensity slider, and accent wells. Pair with
observe_glass() in the server function.
Usage
glass_page(
...,
title = NULL,
preset = "auto",
intensity = 0.45,
persist = TRUE,
scene = "tahoe",
wallpaper = NULL,
plot_surface = "clear",
flatten = FALSE,
controls = TRUE,
theme = NULL
)Arguments
- ...
UI elements passed to
shiny::fluidPage().- title
Optional page title (
shiny::titlePanel()).- preset, intensity, persist, scene, wallpaper, plot_surface, flatten
Forwarded to
glass_theme(). Persistence defaults toTRUEhere.- controls
TRUEfor the default control row (toggle, intensity, accent),FALSEfor none, or a character vector subset of"toggle","intensity","accent".- theme
Optional pre-built
glass_theme()object. WhenNULL, one is created from the arguments above.
Examples
if (interactive()) {
library(shiny)
library(shinyglass)
ui <- glass_page(
title = "Hello, glass",
plotOutput("plot")
)
server <- function(input, output, session) {
observe_glass(input, session)
output$plot <- renderPlot(plot(1:10), bg = "transparent")
}
shinyApp(ui, server)
}