I built the App with Rshiny .
I have a infoBox pair and I would like to use the href parameter to make a popup when infoBox .
I use shinyBS for popup options. here is what i tried:
valueBox(value=entry_01, icon = icon("users","fa-lg",lib="font-awesome"),href=shinyInput(actionLink,id='button_01',len=1,class="btn btn-default action-button",label=""), width=NULL,color = "light-blue",subtitle = "" )
But I realized that the href parameter works fine if we want to link on an external website, for example href = "http://stackoverflow.com/" but I did not know how to set the link in the internal link of the application.
EDIT
I am doing this editing because I have found a solution that makes the window accessible and makes it brilliant, thinking it is an action button by adding two variables to the valueBox output list.
- class action-button
- id , which allows us to use the observation or observation function to detect when the value cell clicks.
Here is a reproducible example
require(shiny) require(shinydashboard) header <- dashboardHeader(title="ReproductibleExample") sidebar <- dashboardSidebar(disable=T) body <- dashboardBody(valueBoxOutput("box_01"), textOutput("print")) ui <- dashboardPage(header, sidebar, body) server<-shinyServer(function(input, output,session) { output$box_01 <- renderValueBox({ entry_01<-20 box1<-valueBox(value=entry_01 ,icon = icon("users",lib="font-awesome") ,width=NULL ,color = "blue" ,href="#" ,subtitle=HTML("<b>Test click on valueBox</b>") ) box1$children[[1]]$attribs$class<-"action-button" box1$children[[1]]$attribs$id<-"button_box_01" return(box1) }) output$print<-renderText({ print(input$button_box_01) }) }) shinyApp(ui,server)