Skip to contents

The rounded_*() functions adjust the corners of a tag element.

Usage

rounded_all(x, size)

rounded_top(x, size)

rounded_right(x, size)

rounded_bottom(x, size)

rounded_left(x, size)

Arguments

x

A tag element or .style pronoun.

size

A number or character string specifying a corner size. One of,

  • 0

  • 1

  • 2

  • 3

  • 4

  • 5

  • "circle"

  • "pill"

    Use 0 to remove rounded corners.

Value

An object of the same type as x.

Examples


library(htmltools)

div(
  .style %>%
    rounded_all(3)
)
#> <div class="rounded-3"></div>

div(
  .style %>%
    rounded_left("pill")
)
#> <div class="rounded-left-pill"></div>