How to hide show tabs in shiny app in R

0 votes
How to hide/show tabs in shiny app in R?

Is there a way to show tabs only when (input == "") condition.

I have tabs for each category. Can i show specific category tab depending on selection of tabs?
Aug 21, 2019 in Data Analytics by radha
6,683 views

1 answer to this question.

0 votes

Hi, Radha

One way is to use hidetab and showtab by providing is to tabPanel, navlistPanel, etc inside the shiny app to hide tabs within tablistpanel or navlistpanel.

Syntax: 

showTab(inputId, target, select = FALSE, session = getDefaultReactiveDomain())

hideTab(inputId, target, session = getDefaultReactiveDomain())

Here InputId is the id of tablistPanel or navlist panel, etc. whereas the target is the tabs panel which needs to be hidden in the shiny app.

Use hideTab(id) after checking condition using reactive value or input$input_id.

#example if(input$sales >20000){ hideTab(id,target = [tabpanel id]) }
answered Aug 22, 2019 by anonymous
• 33,030 points

See the documentation for more information on hidetab and show tab here.

https://shiny.rstudio.com/reference/shiny/1.2.0/showTab.html

Related Questions In Data Analytics

0 votes
1 answer

How to reduce the height of valueBox in shiny R?

Add this line before using your vlaueBoxes tags$head(tags$style(HTML(".small-box ...READ MORE

answered Dec 4, 2018 in Data Analytics by Haseeb
4,008 views
+1 vote
1 answer

How to add videos in a shiny R dashboard?

Its pretty simple, try this: server.r library(shiny) shinyServer(function(input, output, session) ...READ MORE

answered Dec 4, 2018 in Data Analytics by Haseeb
4,057 views
0 votes
2 answers

How to add sliderbars in a shiny R dashboard?

To add slider bar and slider range ...READ MORE

answered Dec 5, 2018 in Data Analytics by Kalgi
• 52,350 points
1,410 views
0 votes
0 answers

How to normalize values in fields to show in plots in R?

Hi, I use a dataset called airquality ...READ MORE

Jul 9, 2019 in Data Analytics by sindhu
783 views
+1 vote
1 answer

Error saying "could not find function "shinyUI"" in shiny R

Its a small spelling mistake that you've ...READ MORE

answered Nov 28, 2018 in Data Analytics by Maverick
• 10,840 points
2,607 views
+1 vote
1 answer

Error saying "could not find function dashboardPage" in shiny R

Include this line in the code: Library(shinydashboard) READ MORE

answered Nov 29, 2018 in Data Analytics by Maverick
• 10,840 points
3,628 views
0 votes
1 answer

How to include css code in shiny r app?

To include a CSS file, use includeCSS(), ...READ MORE

answered Aug 30, 2019 in Data Analytics by anonymous
• 33,030 points
2,163 views
0 votes
1 answer

How to format output in shiny app?

You can use sprintf() to define the ...READ MORE

answered Aug 21, 2019 in Data Analytics by anonymous
• 33,030 points
1,059 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP