Unlimited learning, half price | 50% off

Last chance! 50% off unlimited learning

Sale ends in


cascadess (version 0.1.0)

padding: Padding

Description

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.

Usage

padding(x, all = NULL, top = NULL, right = NULL, bottom = NULL, left = NULL)

Arguments

x

A tag element or .style pronoun.

all

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.

top, right, bottom, left

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.

Panels

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

Examples

Run this code
# 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