You can use this helper function to wrap link element around a shiny::[icon][shiny::icon]. It may be useful to attach a modal window to (or embed a popover into) into such a link.

shiny_iconlink(name = "info-circle", id = NULL, ...)

Arguments

name

character, name of the icon, passed to shiny::[icon][shiny::icon]

id

character, option ID for the link

...

other arguments passed to shiny::[icon][shiny::icon]

Value

htmltools::[tag][htmltools::tag], <a/>

Examples

shiny_iconlink()
#> <a href="#">
#>   <i class="fas fa-circle-info" role="presentation" aria-label="circle-info icon"></i>
#> </a>

shiny_iconlink() %>%
  bs_embed_popover(title = "Help!", content = "I need somebody")
#> <a href="#" title="Help!" data-toggle="popover" data-content="I need somebody" data-placement="top">
#>   <i class="fas fa-circle-info" role="presentation" aria-label="circle-info icon"></i>
#> </a>