layout_columns | R Documentation |
Create responsive, column-based grid layouts, based on a 12-column grid.
layout_columns(
...,
col_widths = NA,
row_heights = NULL,
fill = TRUE,
fillable = TRUE,
gap = NULL,
class = NULL,
height = NULL,
min_height = NULL,
max_height = NULL
)
... |
Unnamed arguments should be UI elements (e.g., |
col_widths |
One of the following:
|
row_heights |
One of the following:
|
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. |
gap |
A CSS length unit defining the
|
class |
Additional CSS classes for the returned UI element. |
height |
Any valid CSS unit (e.g.,
|
min_height , max_height |
The maximum or minimum height of the layout container.
Can be any valid CSS unit (e.g.,
|
Column-based layouts on the bslib website.
breakpoints()
for more information on specifying column widths at
responsive breakpoints.
Other Column layouts:
layout_column_wrap()
x <- card("A simple card")
page_fillable(
layout_columns(x, x, x, x)
)
# Or add a list of items, spliced with rlang's `!!!` operator
page_fillable(
layout_columns(!!!list(x, x, x))
)
page_fillable(
layout_columns(
col_widths = c(6, 6, 12),
x, x, x
)
)
page_fillable(
layout_columns(
col_widths = c(6, 6, -2, 8),
row_heights = c(1, 3),
x, x, x
)
)
page_fillable(
fillable_mobile = TRUE,
layout_columns(
col_widths = breakpoints(
sm = c(12, 12, 12),
md = c(6, 6, 12),
lg = c(4, 4, 4)
),
x, x, x
)
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.