Go to a different Page in shiny by Clicking on the link on an image


#1

...Hello,

I am trying to build an application. My issue here is, I am not able to link a new Shiny page (which is not in the current application) to an header image. In short, when user clicks on the Header image, it should go to another Shiny Page where instructions to operate the application is given.

I would appreciate any help.


#2

There are a few options do this. However, it would be helpful to see a reprex.

There was a discussion on this topic a few months back on using hyperlinks to navigate to other pages (see the last comment).

To integrate this in images, wrapping tags$img inside the tags$a should do the trick.

tags$a("Some Title", 
    onclick="customHref('some-destination')",  
    tags$img(src = "path/to/image/image.png", alt= "my cool image")
)

#3

Thank you for the help. HTML tag worked out.


#4

If your question's been answered (even by you!), would you mind choosing a solution? It helps other people see which questions still need help, or find solutions if they have similar problems. Here’s how to do it: