Description Usage Arguments Details Value Examples
Builds a deck of bootstrap cards
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
data |
Data frame |
title |
Title for the card |
text |
Text for the card |
image |
Path to the card image |
link |
URL to link to from title and image |
footer |
Card footer |
header |
Card header |
tags |
Tags to be assigned to each card |
layout |
Card layout is a string, defaults to "label-below" (see details) |
width |
Card width is an integer between 1 and 5 |
spacing |
Spacing between cards is an integer between 0 and 5 |
breakpoint |
Number between 1 and 5, controlling label size on horizontal and inset layouts |
label_colour |
Colour applied to the card label (if NULL, colour inherits) |
border_colour |
Colour applied to the card border (if NULL, colour inherits) |
border_width |
Width of card border is an integer between 0 and 5 |
border_radius |
Amount of rounding on card corners is an integer between 0 and 5 |
This function constructs the HTML necessary to specify a deck of bootstrap 4 cards suitable for inclusion within an R markdown document. It takes a data frame as the first argument, with one row for each card to be generated.
Cards are specified using the title, text, image,
link, footer, header, and tags arguments. These
arguments take expressions to be evaluated using the user-supplied
data, and should evaluate to character vectors that have length 1 or
the same number of rows as data.
The layout argument is a single character string specifying the
layout of the cards: possible values are "label-below" (the default),
"label-above", "label-left", "label-right", "label-only", "image-only",
"inset-top", "inset-bottom".
The width, spacing, breakpoint, border_width,
and border_radius arguments all take integer inputs specifying
the visual appearance of the cards. Allowed values range from 0 to 5, except
for width and breakpoint which cannot be 0. The other two
arguments label_colour and border_colour take a single string
specifying colours of the relevant parts of the card.
A "shiny.tag" object containing the HTML for the card deck
1 2 3 4 5 6 7 8 9 10 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.