Improve visualization of selectInput options

How do I see all the selectInput options, as it is, it was bad to see (Image attached). I believe the size needs to be adjusted, but I don't know how to do that.

Executable code below:

library(shiny)

ui <- fluidPage(
  
  column(4,
        
         wellPanel(
           br(),
           splitLayout(

           numericInput("weight1", label = h5("Weight 1"), min = 0, max = 1, value = NA, step = 0.1),
          
           selectInput("maxmin", label = h5("Maximize or Minimize"),choices = list("Maximize " = 1, "Minimize" = 2), 
                       selected = "")),
           
           numericInput("weight2", label = h5("Weight 2"), min = 0, max = 1, value = NA, step = 0.1),
           
           numericInput("weight3", label = h5("Weight 3"), min = 0, max = 1, value = NA, step = 0.1),
           
           numericInput("weight4", label = h5("Weight 4"), min = 0, max = 1, value = NA, step = 0.1))),
  
  hr(),
  
  column(8,
         tabsetPanel(tabPanel("table1", DTOutput('table1')))))

server <- function(input, output, session) {
  
}

shinyApp(ui = ui, server = server)

enter image description here

By "size" do you mean "width"? If so, the numericInput() and selectInput() functions have a width argument that you can adjust to your liking. Notice how I added the argument to some of your inputs:

library(shiny)
library(DT)

ui <- fluidPage(
  
  column(
    width = 4,
    wellPanel(
      br(),
      splitLayout(
        numericInput("weight1", label = h5("Weight 1"), min = 0, max = 1, value = NA, step = 0.1),
        selectInput("maxmin", label = h5("Maximize or Minimize"),choices = list("Maximize " = 1, "Minimize" = 2), selected = "")
      ),
      
      numericInput("weight2", label = h5("Weight 2"), min = 0, max = 1, value = NA, step = 0.1, width = "200px"),
      numericInput("weight3", label = h5("Weight 3"), min = 0, max = 1, value = NA, step = 0.1, width = "300px"),
      numericInput("weight4", label = h5("Weight 4"), min = 0, max = 1, value = NA, step = 0.1, width = "400px")
    )
  ),
  
  hr(),
  
  column(
    width = 8,
    tabsetPanel(tabPanel("table1", DTOutput('table1'))))
)

server <- function(input, output, session) {
  
}

shinyApp(ui = ui, server = server)

This topic was automatically closed 54 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.