
Last chance! 50% off unlimited learning
Sale ends in
The padding()
function adjusts the inner spacing of a tag element. The
padding of a tag element is the space between the tag element's border and
its content or child elements.
padding(x, all = NULL, top = NULL, right = NULL, bottom = NULL, left = NULL)
A tag element or .style pronoun.
A responsive argument.
One of 1:5
specifying a padding for all sides of the tag element,
defaults to NULL
, in which case the argument is ignored. 0 removes all
inner space and 5 adds the most space.
A responsive argument.
One of 1:5
specifying a padding for the element's respective side,
defaults to NULL
, in which case the argument is ignored. 0 removes all
inner space and 5 adds the most space.
Well panels.
wellPanel( radioButtons( inputId = "id", label = "Radio input", choices = c( "Choice 1", "Choice 2" ) ) )
Radio input
Choice 2
Shrink well padding.
wellPanel( .style %>% padding(1), radioButtons( inputId = "id", label = "Radio input", choices = c( "Choice 1", "Choice 2" ) ) )
Radio input
Choice 2
Auto width.
wellPanel( .style %>% padding(1), radioButtons( inputId = "id", label = "Radio input", choices = c( "Choice 1", "Choice 2" ) ) %>% width("auto") )
Radio input
Choice 2
# NOT RUN {
library(htmltools)
div(
.style %>%
margin(2) %>%
border("green") %>%
padding(2) %>%
background("red"),
"Donec vitae dolor."
)
# }
Run the code above in your browser using DataLab