border.RdUse border() to add or modify tag element borders.
border(tag, color = NULL, sides = "all", round = NULL)
| tag | A tag element. |
|---|---|
| color | One of " |
| sides | One or more of |
| round | One or more of |
Other design utilities:
active(),
affix(),
background(),
display(),
float(),
font(),
height(),
padding(),
scroll(),
shadow(),
width()
### Change border color div( div() %>% height(3) %>% width(3) %>% border("green"), div() %>% height(3) %>% width(3) %>% border( color = "blue", sides = c("left", "right") ) )#> <div> #> <div class="h-3 w-3 border border-green"></div> #> <div class="h-3 w-3 border-left border-right border-blue"></div> #> </div>### Round sides sides <- c("top", "right", "bottom", "left", "circle", "all") div( lapply( sides, border, tag = div() %>% height(3) %>% width(3), color = "black" ) ) %>% display("flex") %>% flex(wrap = TRUE)#> <div class="d-flex flex-wrap"> #> <div class="h-3 w-3 border-top border-black"></div> #> <div class="h-3 w-3 border-right border-black"></div> #> <div class="h-3 w-3 border-bottom border-black"></div> #> <div class="h-3 w-3 border-left border-black"></div> #> <div class="h-3 w-3 border-circle border-black"></div> #> <div class="h-3 w-3 border border-black"></div> #> </div>