Description Usage Arguments See Also Examples
Create blocks of content with card
. deck
is used to group and add padding
is placed around any number of cards. Additionally, grouping cards with
deck
has the benefit of aligning the footer of each card.
1 2 3 |
... |
For card, For deck, any number of |
header |
A character string or tag element specifying the header of the
card, defaults to |
footer |
A character string or tag element specifying the footer of the
card, defaults to |
Other components:
alert()
,
badge()
,
blockquote()
,
collapsePane()
,
d1()
,
dropdown()
,
img()
,
jumbotron()
,
modal()
,
navContent()
,
popover()
,
pre()
,
toast()
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 | ### A simple card
column(
width = 4,
card(
p("Praesent fermentum tempor tellus.")
)
)
### Adding a title, subtitle
column(
width = 4,
card(
h5("Mauris mollis tincidunt felis."),
h6("Phasellus at dui in ligula mollis ultricies."),
p("Nullam tempus. Mauris mollis tincidunt felis."),
p("Nullam libero mauris, consequat quis, varius et, dictum id, arcu.")
)
)
### Styling cards
deck(
card(
header = "Donec pretium posuere tellus",
p("Donec hendrerit tempor tellus."),
p("Cras placerat accumsan nulla.")
) %>%
font(color = "teal"),
card(
p("Aliquam posuere."),
p("Phasellus neque orci, porta a, aliquet quis, semper a, massa."),
p("Pellentesque dapibus suscipit ligula.")
) %>%
border("orange"),
card(
header = "Phasellus lacus",
p("Etiam laoreet quam sed arcu."),
p("Etiam vel tortor sodales tellus ultricies commodo."),
footer = "Nam euismod tellus id erat."
) %>%
background("grey") %>%
font(color = "indigo")
)
### Cards with list groups
column(
width = 4,
card(
listGroupInput(
id = "lg1",
flush = TRUE,
choices = c(
"Pellentesque tristique imperdiet tortor.",
"Lorem ipsum dolor sit amet, consectetuer adipiscing elit.",
"Phasellus purus."
),
values = c(
"choice1",
"choice2",
"choice3"
)
)
)
)
### Tabbed content in cards
card(
header = navInput(
id = "tabs",
choices = c("Tab 1", "Tab 2", "Tab 3"),
appearance = "tabs"
),
navContent(
navPane(
"Phasellus purus.",
"Proin neque massa, cursus ut, gravida ut, lobortis eget, lacus.",
"Phasellus purus."
),
navPane(
"Donec at pede. Praesent augue.",
"Pellentesque tristique imperdiet tortor."
),
navPane(
"Fusce suscipit, wisi nec facilisis facilisis,",
"est dui fermentum leo, quis tempor ligula erat quis odio.",
"Donec hendrerit tempor tellus."
)
)
)
### Deck of cards
deck(
card(
title = "Nullam tristique",
p("Fusce sagittis, libero non molestie mollis, magna orci ultrices ",
"dolor, at vulputate neque nulla lacinia eros."),
p("Nunc rutrum turpis sed pede."),
footer = "Cras placerat accumsan nulla."
),
card(
title = "Integer placerat",
p("Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Donec ",
"hendrerit tempor tellus."),
footer = "Cras placerat accumsan nulla."
),
card(
title = "Phasellus neque",
p("Donec at pede. Etiam vel neque nec dui dignissim bibendum."),
footer = "Cras placerat accumsan nulla."
)
)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.