bsAlert: Bootstrap3 alert

Description Usage Arguments Details Value Examples

View source: R/bs_components.R

Description

Add a Bootstrap3 alert component to the UI

Usage

1
bsAlert(..., status = "success", closeable = TRUE)

Arguments

...

any shiny tag or tagList you want to add to the alert body, or any additional attributes you want to add to the alert element.

status

string, one of "success", "info", "warning", "danger"

closeable

bool, can the alert be closed?

Details

Read more here: https://getbootstrap.com/docs/3.3/components/#alerts

Value

shiny tag element

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
if(interactive()) {
  library(shiny)
  ui <- fluidPage(
    bsAlert(tags$b("Success: "), "You made it", status = "success"),
    bsAlert(tags$b("Info: "), "Something happened", status = "info"),
    bsAlert(tags$b("Warning: "), "Something is not right", status = "warning"),
    bsAlert(tags$b("Danger: "), "Oh no...", status = "danger")
  )
  server <- function(input, output, session) {}
  shinyApp(ui, server)
}

spsComps documentation built on Feb. 3, 2022, 1:07 a.m.