Skip to content

Generates an HTML anchor (<a>) element containing an image, to be used as a link in a navbar.

Usage

fn_navbar(link, class, image, width)

Arguments

A string. The URL that the anchor element will link to.

class

A string. The CSS class to be applied to the anchor element.

image

A string. The source URL of the image to be displayed within the anchor element.

width

A string or numeric. The width of the image, specified as a valid CSS width value (e.g., "100px", "50%").

Value

An HTML anchor element with an embedded image.

Examples

if (FALSE) { # \dontrun{
  # Example usage within a Shiny UI
  ui <- fluidPage(
    fn_navbar(link = "https://www.example.com", class = "navbar-link", image = "https://www.example.com/logo.png", width = "100px")
  )

  server <- function(input, output, session) {
  }

  shinyApp(ui, server)
} # }