if(interactive()) {
library(shiny)
library(magrittr)
ui <- fluidPage(
tags$b("Different status"),
c("primary", "info", "success", "warning", "danger") %>%
lapply(function(x) spsTitle(x, "4", status = x)),
tags$b("custom color"),
spsTitle("purple", "4", other_color = "purple"),
spsTitle("pink", "4", other_color = "pink"),
tags$b("Different levels"),
lapply(as.character(1:6), function(x) spsTitle(paste0("H", x), x)),
tags$b("Different opacity"),
lapply(seq(0.2, 1, 0.2), function(x) spsTitle(as.character(x), opacity = x))
)
server <- function(input, output, session) {}
shinyApp(ui, server)
}
Run the code above in your browser using DataLab