There doesn't appear to be a built-in way to do that with the selectize.js library (which selectInput uses by default).
But you could add an option called "Select All", and then, on the server side, use observe() combined with updateSelectInput, to select all the items. For example:
choices <- c("Select All", "choice 1", "choice 2", "choice 3")
shinyApp(
ui = fluidPage(
selectInput("myselect", "Select box", choices, multiple = TRUE),
verbatimTextOutput("selected")
),
server = function (input, output, session) {
observe({
if ("Select All" %in% input$myselect) {
# choose all the choices _except_ "Select All"
selected_choices <- setdiff(choices, "Select All")
updateSelectInput(session, "myselect", selected = selected_choices)
}
})
output$selected <- renderText({
paste(input$myselect, collapse = ", ")
})
}
)