I am trying to generate a compact shiny dashboard. I have tried different options like renderTable, themes to make the output compact but still the output is very sparse. The tabs are also not looking very disjointed. The dashboard is loosing lot of space in between.
library(bslib)
library(shiny)
custom_theme <- bs_theme(
version = 5,
bg = "#FFFFFF",
fg = "#000000",
primary = "#0199F8",
secondary = "#FF374B",
base_font = "Maven Pro")
dt_4cyl = data.table(dt_mtcars%>% filter(cyl == 4))
dt_6cyl = dt_mtcars%>% filter(cyl == 6)
dt_8cyl = dt_mtcars%>% filter(cyl == 8)
server_fnl_integeration <- function(input, output, session) {
output$dt_4cyl_op <- renderDT(dt_4cyl)
output$dt_6cyl_op <- renderDT(dt_6cyl)
output$dt_8cyl_op <- renderDT(dt_8cyl)}
ui_tabPanel_4cyl = tabPanel(tableOutput("dt_4cyl_op"))
ui_tabPanel_6cyl = tabPanel(tableOutput("dt_6cyl_op"))
ui_tabPanel_8cyl = tabPanel(tableOutput("dt_8cyl_op"))
ui_fnl_integeration <- fluidPage(
theme = custom_theme,
tags$style(".modal-dialog {max-width: 90vw;}"),
tabsetPanel(
tabPanel("FourCylinder",
tabsetPanel(ui_tabPanel_4cyl)),
tabPanel("SixCylinder",
tabsetPanel(ui_tabPanel_4cyl)),
tabPanel("EightCylinder",
tabsetPanel(ui_tabPanel_8cyl))
))
shinyApp(ui = ui_fnl_integeration, server = server_fnl_integeration)