
Last chance! 50% off unlimited learning
Sale ends in
Constructs a slider widget with characters instead of numeric values.
sliderTextInput(inputId, label, choices, selected = NULL, animate = FALSE,
grid = FALSE, hide_min_max = FALSE, from_fixed = FALSE,
to_fixed = FALSE, from_min = NULL, from_max = NULL, to_min = NULL,
to_max = NULL, force_edges = FALSE, width = NULL, pre = NULL,
post = NULL, dragRange = TRUE)
The input
slot that will be used to access the value.
Display label for the control, or NULL
for no label.
Character vector to select a value from.
The initially selected value, if length > 1, create a range slider.
TRUE to show simple animation controls with default settings, for more details see sliderInput
.
Logical, show or hide ticks marks.
Hides min and max labels.
Fix position of left (or single) handle.
Fix position of right handle.
Set minimum limit for left handle.
Set the maximum limit for left handle.
Set minimum limit for right handle.
Set the maximum limit for right handle.
Slider will be always inside it's container.
The width of the input, e.g. 400px
, or 100%
.
A prefix string to put in front of the value.
A suffix string to put after the value.
See the same argument in sliderInput
.
The value retrieved server-side is a character vector.
# NOT RUN {
if (interactive()) {
library("shiny")
library("shinyWidgets")
ui <- fluidPage(
br(),
sliderTextInput(
inputId = "mySliderText",
label = "Month range slider:",
choices = month.name,
selected = month.name[c(4, 7)]
),
verbatimTextOutput(outputId = "result")
)
server <- function(input, output, session) {
output$result <- renderPrint(str(input$mySliderText))
}
shinyApp(ui = ui, server = server)
}
# }
Run the code above in your browser using DataLab