Quantcast
Channel: Active questions tagged r - Stack Overflow
Viewing all articles
Browse latest Browse all 202012

R shiny: Add weblink to actionButton

$
0
0

I have a box in my shiny application that has a button included within a shiny dashboard box like this:

shiny::fluidRow(
  shinydashboard::box(title = "Intro Page", "Some description...", 
      shiny::actionButton(inputId='ab1', label="Learn More", icon = icon("th"))
  )
)

I want to include a weblink in the button such that when I click on it, it should open the corresponding webpage in a new tab.

I know that I can do this instead:

# this does not create a submit button though, it just creates a link.
tags$div(class = "submit",
         tags$a(href = "www.google.com", 
                "Learn More", 
                target="_blank")
)

But with actionButton, there is a nice button and I can add an icon to it which looks aesthetically better.

enter image description here

How do I add a link to actionButton in shiny?


Viewing all articles
Browse latest Browse all 202012

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>