rstudio / shinydashboard

Shiny Dashboarding framework
https://rstudio.github.io/shinydashboard/
Other
893 stars 298 forks source link

Have logo associated with url instead of dropdownMenu #334

Open TiphaineCMartin opened 4 years ago

TiphaineCMartin commented 4 years ago

Hi,

I would like to put several image links and a link to contact email instead to dropdownMenu.

Could you advise me how I can add this on the top right of my dashboard instead dropdownMenu?

Best regards, Tiphaine

oganm commented 4 years ago

You can place any element to the header if you trick the dashboard into thinking its a dropdown menu

dashboardHeader(
   tags$li(tags$a(href = 'https://www.google.com',tags$img(src = 'https://www.google.com/images/branding/googlelogo/2x/googlelogo_color_92x30dp.png')), 
    class= 'dropdown'))

Note that if the image is too larger than 50px it will make your header look a little weird. You can fix this by increasing the size of the header through css or decreasing the size of the image