firmo23
firmo23

Reputation: 8404

Increase the length of actionbutton in a shiny app

I would like to know how I could increase the length of an actionbutton in a shiny app.

library(shiny)

shinyApp(
  shinyUI(fluidPage(
    inputPanel(
      ## Original
      actionButton('button', 'Hi'),
      
      actionButton("optimize","Optimize", class = "run-button",
                   icon("paper-plane"), 
                   style="color: #fff; background-color: #337ab7; border-color: #2e6da4")
    )
  )),
  shinyServer(function(input,output){})
)

Upvotes: 2

Views: 924

Answers (1)

Susan Switzer
Susan Switzer

Reputation: 1922

add width to your css

library(shiny)

shinyApp(
  shinyUI(fluidPage(
    inputPanel(
      ## Original
      actionButton('button', 'Hi'),
      
      actionButton("optimize","Optimize", class = "run-button",
                   icon("paper-plane"), 
                   style="color: #fff; background-color: #337ab7; border-color: #2e6da4; width:800px;")
    )
  )),
  shinyServer(function(input,output){})
)

Upvotes: 4

Related Questions