Skip to contents

The shadow() function adjusts the box shadow of a tag element.

Usage

shadow(x, size)

Arguments

x

A tag element or .style pronoun.

size

A character string specifying the shadow size. One of,

  • "small"

  • "sm"

  • "medium"

  • "md"

  • "large"

  • "lg"

  • "none"

Value

An object of the same type as x.

Examples


library(htmltools)

div(
  .style %>%
    shadow("small")
)
#> <div class="shadow-sm"></div>

div(
  .style %>%
    border_color(theme_warning()) %>%
    background_color(theme_warning()) %>%
    shadow("medium")
)
#> <div class="border-warning bg-warning shadow-md"></div>