if (FALSE) {
if (interactive()) {
library(shiny)
library(r2resize)
library(htmltools)
ui <- fluidPage(
tags$h2("Flexible Cards Example"),
flexCard(
item1 = c(
bg = "https://r2resize.obi.obianom.com/m/image1.jpg",
icon = "chart-line",
title = "Market Trends",
subtitle = "Analysis of current market movements"
),
item2 = c(
bg = "https://r2resize.obi.obianom.com/m/image2.jpg",
icon = "flask",
title = "Research Projects",
subtitle = "Ongoing studies and experiments",
icon.color = "blue",
text.color = "lightgray"
),
item3 = c(
bg = "https://r2resize.obi.obianom.com/m/image3.jpg",
icon = "users",
title = "Team Collaboration",
subtitle = "Enhancing team productivity",
icon.color = "green"
),
height.px = 400,
width.px = 800,
border.color = "darkgray",
border.width.px = 2,
active.panel = 2 # Start with the second panel active
),
tags$br(),
tags$h2("Flexible Cards with default active panel"),
flexCard(
itemA = c(
title = "Default Panel 1",
subtitle = "No background image",
icon = "info-circle"
),
itemB = c(
title = "Default Panel 2",
subtitle = "Just text",
icon = "lightbulb"
)
)
)
server <- function(input, output) {}
shinyApp(ui, server)
}
}
Run the code above in your browser using DataLab