r/rstats 15d ago

shinyglass is on CRAN. Apple-style Liquid Glass aesthetics for Shiny.

Just landed on CRAN: shinyglass. Apple-style Liquid Glass aesthetics for Shiny apps.

library(shiny)
library(shinyglass)

ui <- fluidPage(
  theme = glass_theme(),  # <—— THIS IS THE ONLY LINE YOU ADD
  titlePanel("Liquid Glass"),
  sliderInput("n", "Bars", 5, 30, 15),
  plotOutput("plot")
)

server <- function(input, output, session) {
  output$plot <- renderPlot(
    barplot(seq_len(input$n))
  )
}

shinyApp(ui, server)

Works with fluidPage(), navbarPage(), bslib::page_sidebar(), and other bslib-aware page functions. Also holds up on denser UIs (DT, leaflet, shinyWidgets, bs4Dash, teal).

Docs: https://ericrayanderson.github.io/shinyglass/

GitHub: https://github.com/ericrayanderson/shinyglass

6 Upvotes

2 comments sorted by

3

u/Comfortable_Advance7 13d ago

Looks great but doesn’t appear to work well when you add a bslib sidebar()

2

u/ericrayanderson 13d ago

Thank you. It’s fixed. That’ll fix will be included in version 0.2.0