1
votes

I want shiny sliderInput to be biuld like attached imageenter image description here

side by side values i want like min and max. the input should be manual and not by slider or dropdown

I tried selectInput but its taking one value in a row I want two values in one row

2

2 Answers

3
votes

You could use fluidRow() and column(). You start by using a fluidRow() and add columns() within that functions,...

Reproducible example:

library(shiny)
ui <- fluidPage(
  fluidRow(
    column(width = 3,
           selectInput("min", "Min Price", 1:4)
    ),
    column(width = 3, 
           selectInput("max", "Max Price", 1:4)
    )
  ),
  fluidRow(
    column(width = 3,
           selectInput("min2", "Property type", letters[1:4])
    ),
    column(width = 3, 
           selectInput("max2", "Bedrooms", 1:4)
    )
  )
)

shinyApp(ui, server = function(input, output) { })
3
votes

@BigDataScientist has a great answer. You can also look into splitLayout in your UI. First you call splitLayout, define the desired cellWidths, then call the objects.

splitLayout(cellWidths = c("50%", "50%"), selectInput(...), selectInput(...))