View source: R/position-centered.R
position_centered | R Documentation |
Use position_centered()
to position an element by its center instead of its edge.
position_centered(x)
x |
A tag element or .style pronoun. |
An object of the same type as x
.
Other position utilities:
position_sticky()
,
position()
library(htmltools)
div(
.style %>%
position("absolute") %>%
position_right(0) %>%
position_centered()
)
tags$button(
type = "button",
.style %>%
position("relative") %>%
background_color(theme_primary()),
"Mail",
span(
.style %>%
position("absolute") %>%
position_top(0) %>%
position_right(0) %>%
position_centered() %>%
rounded_all("pill") %>%
background_color(theme_secondary()),
"+99"
)
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.