I want to create a Shiny
app that includes several collapsible
boxes as a menu on one side. To do this, I have so far used the bsCollapsePanel
function and put it in sidebarPanel
. Unfortunately I have an additional margin from the boxes to the sidebarPanel
. The boxes look set off. But I would like to use ONLY collapsible boxes as sidebar.
I have used the following solution so far:
library(shinythemes)
library(shinyBS)
fluidPage(
theme = shinytheme("cosmo"),
titlePanel(# app title/description
"ShinyApp"),
sidebarLayout(
mainPanel(plotOutput("plot1")),
sidebarPanel(
bsCollapsePanel(
"Color Selection",
actionButton("f1blue", "Blue"),
actionButton("f1red", "Red"),
actionButton("f2blue", "Blue"),
actionButton("f2red", "Red"),
style = "success"
),
)
)
)
And this is the graphical output:
And this is how it should look. I want to avoid this "box within the box" effect. Only collapsibles, no border and no margin through the sidebar panel:
Is there a solution for this and / or maybe another package is better for creating collapsibles / accordions?
I am grateful for any advice!