shadow: Shadows

View source: R/design-shadow.R

shadowR Documentation

Shadows

Description

The shadow utility applies a shadow to a tag element. By default many elements include a shadow to help distinguish them. Use "none" to remove an element's shadow.

Usage

shadow(x, size = "medium")

Arguments

x

A tag element or .style pronoun.

size

One of "none", "small", "medium", or "large" specifying the amount of shadow added, defaults to "medium".

Details

Getting started

div(
  navbar(
    .style %>%
      background("dark") %>%
      font("light") %>%
      margin(bottom = 3),
    brand = "Navbar"
  ),
  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.")
)

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.

Shadow sizes

div(
  buttonInput(
    .style %>%
      margin(2) %>%
      shadow("small"),  # <-
    id = NULL,
    label = "Small"
  ),
  buttonInput(
    .style %>%
      margin(2) %>%
      shadow("medium"),  # <-
    id = NULL,
    label = "Medium"
  ),
  buttonInput(
    .style %>%
      margin(2) %>%
      shadow("large"),  # <-
    id = NULL,
    label = "Large"
  )
)

See Also

Other design utilities: active(), affix(), background(), border(), display(), flex(), float(), font(), height(), margin(), padding(), scroll(), width()


nteetor/yonder documentation built on June 8, 2022, 1:36 p.m.