if (interactive()) {
library(shiny)
# Simple sizeable card with default settings
shinyApp(
ui = fluidPage(
h2("Basic Sizeable Card"),
sizeableCard(
shiny::p("This is some sample text within a sizeable card."),
shiny::img(src = "https://r2resize.obi.obianom.com/m/image1.jpg", height = "100px"),
shiny::p("Use the controls on the right to change its size.")
)
),
server = function(input, output) {}
)
# Sizeable card with custom background and border colors
shinyApp(
ui = fluidPage(
h2("Styled Sizeable Card"),
sizeableCard(
shiny::h4("My Report Summary"),
shiny::p("This card contains important information about a project."),
shiny::em("Adjust the size as needed."),
bg.color = "#F0F4C3",
border.color = "#C0CA33"
)
),
server = function(input, output) {}
)
}
Run the code above in your browser using DataLab