Reproducible code below. I have a shiny app with several tabs, including a "Home" tab. On the Home tab, I would like to include a box with a link to "Tab 2". Meaning when the box is clicked, it takes the user to Tab 2. Additionally, I would also love to have the box do some sort of highlight when a user hovers over it in order to make it easier to recognize that the box is a hyperlink to something. How do I make this work?
library(tidyverse)
library(DT)
library(shiny)
library(shinydashboard)
library(shinyWidgets)
ui <- navbarPage(
useShinydashboard(),
tabPanel(
title = "Home",
box(
title = "Box to link to tab2",
status = "primary",
width = 3
)
),
tabPanel(
title = "Tab 1"
),
tabPanel(
title = "Tab 2",
dataTableOutput("mtcars_table")
)
)
server <- function(input, output) {
output$mtcars_table <- DT::renderDataTable({mtcars})
}
shinyApp(ui, server)