This SO post describes how to add an actionButton
to the top right of the dashboardHeader
in a shinydashboard
. I would like to add two action buttons next to each other in the dashboardHeader
. How can I place the buttons within the header bar so that they do not overlap? More specifically, is there a way to move a button to the left and centre it vertically within the dashboardHeader
?
Aligning Multiple Action Buttons in Shiny Dashboard Header
1k views Asked by Miguel At
2
There are 2 answers
0
On
I can't answer your question directly because I have only used Flexdashboard. But there is a shinyWidgets
package that contains a DropDown widget that allows you to embed multiple widgets into the DropDown. So if the dashboard header only allows a single widget, you could use a dropdown widget to access multiple widgets indirectly See:
http://shinyapps.dreamrs.fr/shinyWidgets/
And the dropdowns & sweetalert menu item. The sample dropdowns there contain links to the underlying shinyWidgets code.
Perhaps you are looking for this
You can adjust
padding
andmargin
to suit your needs. Also, you can add multiple actionButtons.