Description Usage Arguments See Also Examples
The shadow
utility applies a shadow to a tag element. Elements with a
shadow may appear to pop off the page. The material design set of components,
used on Android and for Google applications, commonly uses shadowing.
Although "none"
is an allowed size
, most elements do not have a shadow by
default.
1 | shadow(tag, size = "regular")
|
tag |
A tag element. |
size |
One of |
Other design utilities:
active()
,
affix()
,
background()
,
border()
,
display()
,
float()
,
font()
,
height()
,
padding()
,
scroll()
,
width()
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 | ### Styling a navbar
div(
navbar(brand = "Navbar") %>%
background("cyan") %>%
shadow("small") %>%
margin(bottom = 3),
p(
"Cras mattis consectetur purus sit amet fermentum. Donec sed ",
"odio dui. Lorem ipsum dolor sit amet, consectetur adipiscing ",
"elit. Aenean eu leo quam. Pellentesque ornare sem lacinia quam ",
"venenatis vestibulum."
)
)
### Different shadows
div(
lapply(
c("small", "regular", "large"),
shadow,
tag = div() %>%
padding(5) %>%
margin(2)
)
) %>%
display("flex")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.