if (interactive()) {
library(shiny)
# Simple emphasis card with basic text
shinyApp(
ui = fluidPage(
h2("Emphasis Card Example"),
empahsisCard(
shiny::h4("Important Announcement!"),
shiny::p("Please read this crucial message.")
)
),
server = function(input, output) {}
)
# Emphasis card with a custom background color and multiple elements
shinyApp(
ui = fluidPage(
h2("Styled Emphasis Card"),
empahsisCard(
shiny::h3("Featured Product"),
shiny::img(src = "https://r2resize.obi.obianom.com/m/logo.png", height = "50px"),
shiny::p("Check out our new amazing product!"),
bg.color = "#FFEBEE"
)
),
server = function(input, output) {}
)
}
Run the code above in your browser using DataLab