Paste link in navigation bar in shiny

I have problems navbarPage link into the navigation bar with navbarPage in brilliant form. I can put the link, but navbar looks weird. Does anyone know how to fix this?

To create an application with a link in the navigation bar:

 library(shiny) runApp(list( ui = navbarPage( title="My App", tabPanel("tab1"), tabPanel("tab2"), tabPanel(a(href="http://stackoverflow.com", "stackoverflow"))), server = function(input, output) { } )) 

With shiny_0.9.1

Thanks!

EDIT: A colleague will show me a workaround, it is to put the link we want in panel 3 in title bar 2.

An application to demonstrate this and a solution from @ 20050 8519 21102 26896 16937 for a link in the name of the application:

 runApp(list( ui = navbarPage( title=HTML("<a href=\"http://stackoverflow.com\">stackoverflow</a>"), tabPanel("tab1"), tabPanel(HTML("tab2</a></li><li><a href=\"http://stackoverflow.com\">stackoverflow")) ), server = function(input, output) { } )) 
+5
source share
1 answer

I managed to get him to work on a newer version of Shiny for the site element to the left of NavBar, name:

 corner_element = HTML(paste0('<a href=',shQuote(paste0("https://my.page.com/",page_name,"/")), '>', 'Foo', '</a>')) navbarPage(corner_element, id="page", collapsable=TRUE, inverse=FALSE, # [...] ) 
+2
source

Source: https://habr.com/ru/post/1205437/


All Articles