Build an UIkit alert.
UIkitAlert(..., color = NULL, closable = TRUE)
... | Alert text. |
---|---|
color | Alert color: "primary", "success", "warning", "danger". |
closable | Whether to display a close button. TRUE by default. |
if(interactive()){ library(shiny) shiny::shinyApp( ui = UIkitPage( title = "My UIkit application", h1("Alerts are displayed, if slider > 5"), sliderInput( "slider", "Number of observations:", min = 0, max = 10, value = 2 ), uiOutput("alerts") ), server = function(input, output) { output$alerts <- renderUI({ if (input$slider > 5) { tagList( UIkitAlert( color = "primary", h3("Primary Notice"), "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt" ), UIkitAlert( color = "danger", h3("Danger Notice"), "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt" ), UIkitAlert( color = "warning", h3("Warning Notice"), "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt" ) ) } }) } ) }