layout_column_wrap {bslib} | R Documentation |
Wraps a 1d sequence of UI elements into a 2d grid. The number of columns (and
rows) in the grid dependent on the column width
as well as the size of the
display. For more explanation and illustrative examples, see here
layout_column_wrap(
width,
...,
fixed_width = FALSE,
heights_equal = c("all", "row"),
fill = TRUE,
fillable = TRUE,
height = NULL,
height_mobile = NULL,
gap = NULL,
class = NULL
)
width |
The desired width of each card, which can be any of the following:
|
... |
Unnamed arguments should be UI elements (e.g., |
fixed_width |
Whether or not to interpret the |
heights_equal |
If |
fill |
Whether or not to allow the layout to grow/shrink to fit a
fillable container with an opinionated height (e.g., |
fillable |
Whether or not each element is wrapped in a fillable container. |
height |
Any valid CSS unit (e.g.,
|
height_mobile |
Any valid CSS unit to use for the height when on mobile devices (or narrow windows). |
gap |
A CSS length unit defining the
|
class |
Additional CSS classes for the returned UI element. |
x <- card("A simple card")
# Always has 2 columns (on non-mobile)
layout_column_wrap(1/2, x, x, x)
# Has three columns when viewport is wider than 750px
layout_column_wrap("250px", x, x, x)