I am trying to display a list of cards in a 2d grid using the function bslib::layout_column_wrap()
. However, I get a 1d grid with the cards positioned in one column instead of multiple columns. See a minimal reproducible example below:
library(tidyverse); library(htmlwidgets); library(bslib)
cards_list <- list(
card(card_body("card 1")),
card(card_body("card 2"))
)
layout_column_wrap(width=0.5, cards_list, heights_equal="all", fixed_width=T, fill=T)
When listing the elements of the list, it works fine (see below). However, this is not feasible because my list has hundreds of cards. Can anyone assist me with that?
layout_column_wrap(width=0.5, cards_list[1], cards_list[2], heights_equal="all", fixed_width=T, fill=T)