user interface – R shinny UI code: how to squeeze in all the menu bars into one page

I have the following ui code. I hope to have 11 tabs tab1-tab11 in the menu, but it looks like only 9 of them can show up and the last two tabs (tab10 and tab11) can’t show up. Even after I change the font size, it still doesn’t work. How can I adjust the height of the menu items box and squeeze in all the 11 items into one page?

dashboardPage(skin = "light-blue", title = "datatransform",
              
dashboardHeader(title = "ELISA Data Check"),

dashboardSidebar(

a("Click here to open user instruction", target="_blank", href="ELISA QC App User Instruction.pdf"),    
h1(id="title", "Choose a BAM:"),
tags$style(HTML("#title{font-size: 12px}",".sidebar-menu li a { font-size: 12px; }")), width=300,
  
sidebarMenu(
menuItem("1. tab1", tabName="tab1", icon=icon("flask")),
menuItem("2. tab2", tabName="tab2", icon=icon("flask")),
menuItem("3. tab3", tabName="tab3", icon=icon("flask")),
menuItem("4. tab4", tabName = "tab4", icon = icon("flask")),
menuItem("5. tab5", tabName = "tab5", icon = icon("flask")),
menuItem("6. tab6", tabName = "tab6", icon = icon("flask")),
menuItem("7. tab7", tabName = "tab7", icon = icon("flask")),
menuItem("8. tab8", tabName = "tab8", icon = icon("flask")),
menuItem("9. tab9", tabName = "tab9", icon = icon("flask")),
menuItem("10. tab10", tabName = "tab10", icon = icon("flask")),
menuItem("11. tab11", tabName = "tab11", icon = icon("flask"))
),

actionButton(inputId='button', label="Refresh", onclick = (href="javascript:history.go(0)"))

),
              
dashboardBody(
  
tabItems(
  
tabItem("a",
fluidRow(
tabsetPanel(
tabPanel(strong("Select Output Files"), fileInput("file_1", "Upload .xlsx file:", multiple=TRUE, accept=c(".xlsx"))),
tabPanel(strong("Standard Curve Check"), dataTableOutput("table_1a")),
tabPanel(strong("Sample Check"), dataTableOutput("table_1b")),
tabPanel(strong("Sample Pass"), dataTableOutput("table_1c"))
)
)
),

tabItem("2",
        fluidRow(
          tabsetPanel(
            tabPanel(strong("Select Output Files"), fileInput("file_2", "Upload .xlsx file:", multiple=TRUE, accept=c(".xlsx"))),
            tabPanel(strong("Standard Curve Check"), dataTableOutput("table_2a")),
            tabPanel(strong("Sample Check"), dataTableOutput("table_2b")),
            tabPanel(strong("Sample Pass"), dataTableOutput("table_2c"))
          )
        )
),

tabItem("c",
        fluidRow(
          tabsetPanel(
            tabPanel(strong("Select Output Files"), fileInput("file_3", "Upload .xlsx file:", multiple=TRUE, accept=c(".xlsx"))),
            tabPanel(strong("Standard Curve Check"), dataTableOutput("table_3a")),
            tabPanel(strong("Sample Check"), dataTableOutput("table_3b")),
            tabPanel(strong("Sample Pass"), dataTableOutput("table_3c"))
          )
        )
),


tabItem("d",
        fluidRow(
          tabsetPanel(
            tabPanel(strong("Select Output Files"), fileInput("file_4", "Upload .xlsx file:", multiple=TRUE, accept=c(".xlsx"))),
            tabPanel(strong("Standard Curve Check"), dataTableOutput("table_4a")),
            tabPanel(strong("Sample Check"), dataTableOutput("table_4b")),
            tabPanel(strong("Sample Pass"), dataTableOutput("table_4c"))
          )
        )
),


tabItem("e",
        fluidRow(
          tabsetPanel(
            tabPanel(strong("Select Output Files"), fileInput("file_5", "Upload .xlsx file:", multiple=TRUE, accept=c(".xlsx"))),
            tabPanel(strong("Standard Curve Check"), dataTableOutput("table_5a")),
            tabPanel(strong("Sample Check"), dataTableOutput("table_5b")),
            tabPanel(strong("Sample Pass"), dataTableOutput("table_5c"))
          )
        )
),

tabItem("f",
        fluidRow(
          tabsetPanel(
            tabPanel(strong("Select Output Files"), fileInput("file_6", "Upload .xlsx file:", multiple=TRUE, accept=c(".xlsx"))),
            tabPanel(strong("Standard Curve Check"), dataTableOutput("table_6a")),
            tabPanel(strong("Sample Check"), dataTableOutput("table_6b")),
            tabPanel(strong("Sample Pass"), dataTableOutput("table_6c"))
          )
        )
),


tabItem("g",
        fluidRow(
          tabsetPanel(
            tabPanel(strong("Select Output Files"), fileInput("file_7", "Upload .xlsx file:", multiple=TRUE, accept=c(".xlsx"))),
            tabPanel(strong("Standard Curve Check"), dataTableOutput("table_7a")),
            tabPanel(strong("Sample Check"), dataTableOutput("table_7b")),
            tabPanel(strong("Sample Pass"), dataTableOutput("table_7c"))
          )
        )
),
tabItem("h",
        fluidRow(
          tabsetPanel(
            tabPanel(strong("Select Output Files"), fileInput("file_8a", "Upload .xlsx file:", multiple=TRUE, accept=c(".xlsx"))),
            tabPanel(strong("Standard Curve Check"), dataTableOutput("table_8aa")),
            tabPanel(strong("Sample Check"), dataTableOutput("table_8ba")),
            tabPanel(strong("Sample Pass"), dataTableOutput("table_8ca"))
          )
        )
),
tabItem("i",
        fluidRow(
          tabsetPanel(
            tabPanel(strong("Select Output Files"), fileInput("file_8b", "Upload .xlsx file:", multiple=TRUE, accept=c(".xlsx"))),
            tabPanel(strong("Standard Curve Check"), dataTableOutput("table_8ab")),
            tabPanel(strong("Sample Check"), dataTableOutput("table_8bb")),
            tabPanel(strong("Sample Pass"), dataTableOutput("table_8cb"))
          )
        )
),

tabItem("j",
        fluidRow(
          tabsetPanel(
            tabPanel(strong("Select Output Files"), fileInput("file_9a", "Upload .xlsx file:", multiple=TRUE, accept=c(".xlsx"))),
            tabPanel(strong("Standard Curve Check"), dataTableOutput("table_9aa")),
            tabPanel(strong("Sample Check"), dataTableOutput("table_9ba")),
            tabPanel(strong("Sample Pass"), dataTableOutput("table_9ca"))
          )
        )
),
tabItem("k",
        fluidRow(
          tabsetPanel(
            tabPanel(strong("Select Output Files"), fileInput("file_9b", "Upload .xlsx file:", multiple=TRUE, accept=c(".xlsx"))),
            tabPanel(strong("Standard Curve Check"), dataTableOutput("table_9ab")),
            tabPanel(strong("Sample Check"), dataTableOutput("table_9bb")),
            tabPanel(strong("Sample Pass"), dataTableOutput("table_9cb"))
)
)
)
)
)
)

Thank you so much!

Leave a Comment