View source: R/selectizeInputWithButtons.R
selectizeInputWithButtons | R Documentation |
selectizeInput with buttons and validation utilities
selectizeInputWithButtons( inputId, label, ..., options = NULL, container_id = NULL, help_id = NULL, label_title = NULL, btn_titletips = TRUE, btn_placement = NULL, hide_btns = FALSE )
inputId |
The |
label |
Display label for the control, or |
... |
One or more |
options |
A list of options. See the documentation of selectize.js
for possible options (character option values inside |
container_id |
id for outer |
help_id |
id for span with class |
label_title |
Optional text to appear in info icon tooltip. Used to provide information to user about input. |
btn_titletips |
if |
btn_placement |
Where the |
hide_btns |
If |
selectizeInput
, html
,
addClass
, toggleSelectizeButtons
.
library(shiny) library(shinypanel) ui <- fluidPage( div(class = 'row', div(class = 'col-sm-12 col-lg-6', div(class = 'well-form', textAreaInputWithButtons( inputId = 'text', label = 'Type something:', actionButton( 'btn3', '', icon('plus', 'fa-fw'), title = 'Click to add something' ) ), selectizeInputWithButtons( inputId = 'selection', label = 'Select something:', label_title = 'Information about input', actionButton( 'btn1', '', icon('tag', 'fa-fw'), title = 'this does something' ), actionButton( 'btn2', '', icon('chevron-right', 'fa-fw'), title = 'this does something else' ), options = list(create = TRUE) ) ) ) ) ) server <- function(input, output, session) { choices <- reactive({ paste('Long Option', 1:5) }) observe({ updateSelectizeInput(session, 'selection', choices = choices()) }) } # shinyApp(ui, server)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.