R shinywidgets: format actionbttn to be the same as downloadbttn

49 views Asked by At

I want to format my actionbttn widgets to have their icons above the text with centered alignment, just like the downloadbttn widgets (see picture), but it seems like there is no simple way to accomplish this without css/html.

shinywidgets

My code to produce the example is available below.

library(shiny)
library(shinydashboard)
library(shinyWidgets)

# Define UI for application that draws a histogram
ui <- dashboardPage(

    # Application title
    dashboardHeader(title = "Old Faithful Geyser Data"),

    # Sidebar with a slider input for number of bins 
    dashboardSidebar(
      menuItem(
        "Results", 
        icon = icon("table"),
        downloadBttn(
          outputId = "saveplot",
          label = "Save plot",
          style = "simple",
          size = "sm"
        ),
        actionBttn(
          inputId = "deleteLocalSave", 
          label = "Reset settings", 
          style="simple", 
          size = "sm",
          color = "danger",
          icon = icon("trash")
        ),
        br(),
        expandedName = "exp_results"
      )
    ),
    
    dashboardBody(
      
    )
)

# Define server logic required to draw a histogram
server <- function(input, output) {

}

# Run the application 
shinyApp(ui = ui, server = server)
0

There are 0 answers