Skip to contents

The visible() function adjusts the visibility of a tag element. An invisible element is both visually hidden and is also hidden from screen readers.

Usage

visible(x, show)

Arguments

x

A tag element or .style pronoun.

show

A boolean specifying the visibility. One of,

  • TRUE

  • FALSE

Value

An object of the same type as x.

Examples


library(htmltools)

div(
  .style %>%
    visible(FALSE),
  "Not visible"
)
#> <div class="invisible">Not visible</div>