library(shiny)
library(bslib)
library(OSUICode)
ui <- fluidPage(
theme = bs_theme(),
theme_toggle(),
br(),
super_card("Hello World!")
)
server <- function(input, output, session) {
observeEvent(input$custom_mode, {
session$setCurrentTheme(
if (input$custom_mode) {
bslib_dark_theme
} else {
bs_theme(version = 4)
}
)
})
}
shinyApp(ui, server)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.