Choose active tab in quarto/shiny?

Hello,

My script.qmd contains a shiny app. So when developing my project, I execute the following in the terminal:

quarto render script.qmd 
shiny run --reload --launch-browser --port=0 /cloud/project/app.py

This opens the end result of my project in a new chrome tab. However, I would like it to open with a specific tab or sub-tab open. For now, the first tab that is defined in script.qmd is automatically the active one.

Thank you in advance!

To open a specific tab or sub-tab in your Shiny app, you can set the initial tab to be active by modifying your app's UI code. Use updateTabsetPanel() or updateNavbarPage() in the server function to programmatically set the desired tab as active when the app starts.

1 Like

Great idea, thanks!

What about the parts of the app that are written 100% in quarto?

Since most of it is quarto, with a few interactive parts where I use shiny.