Skip to contents

The focus_color() function adjusts the focus shadow color of a tag element.

Usage

focus_color(x, color)

Arguments

x

A tag element or .style pronoun.

color

A character string specifying a color. One of,

  • "primary"

  • "secondary"

  • "success"

  • "danger"

  • "warning"

  • "info"

  • "light"

  • "dark"

  • "body"

  • "black"

  • "white"

Value

An object of the same type as x.

Examples


library(htmltools)

tags$button(
  .style %>%
    background_color(theme_primary()) %>%
    focus_color(theme_primary()),
  "Primary themed button with primary themed focus ring"
)
#> <button class="bg-primary focus-ring focus-ring-primary">Primary themed button with primary themed focus ring</button>