I am finding it difficult to achieve a bslib layout of 1 card in the 1st column taking 2 rows, and 2 cards in the second column in each row. How do I achieve a card layout in bslib like this:
Here is a small app to try and achieve this goal.
library(shiny)
library(bslib)
x <- card("This is a card.")
ui <- page_navbar(
nav_panel(
"One",
layout_columns(
### Column and row sizes
col_widths = c(4, 4, 4),
row_heights = c(2, 1, 1),
x, x, x
)
)
)
server <- function(input, output, session) {
}
shinyApp(ui = ui, server = server)
You can try this configuration recommended by bslib
library(bslib)
library(shiny)
x <- card("This is a card.")
ui <- page_navbar(
nav_panel(
title = "{bslib} layout",
layout_columns(
col_widths = 6,
x,
layout_columns(
col_widths = 12,
x,
x
)
)
)
)
server <- function(input, output, session) {
}
shinyApp(ui = ui, server = server)