Build a Framework7 picker input
f7Picker( inputId, label, placeholder = NULL, value = choices[1], choices, rotateEffect = TRUE, openIn = "auto", scrollToInput = FALSE, closeByOutsideClick = TRUE, toolbar = TRUE, toolbarCloseText = "Done", sheetSwipeToClose = FALSE )
inputId | Picker input id. |
---|---|
label | Picker label. |
placeholder | Text to write in the container. |
value | Picker initial value, if any. |
choices | Picker choices. |
rotateEffect | Enables 3D rotate effect. Default to TRUE. |
openIn | Can be auto, popover (to open picker in popover), sheet (to open in sheet modal). In case of auto will open in sheet modal on small screens and in popover on large screens. Default to auto. |
scrollToInput | Scroll viewport (page-content) to input when picker opened. Default to FALSE. |
closeByOutsideClick | If enabled, picker will be closed by clicking outside of picker or related input element. Default to TRUE. |
toolbar | Enables picker toolbar. Default to TRUE. |
toolbarCloseText | Text for Done/Close toolbar button. |
sheetSwipeToClose | Enables ability to close Picker sheet with swipe. Default to FALSE. |
David Granjon, dgranjon@ymail.com
if(interactive()){ library(shiny) library(shinyMobile) shinyApp( ui = f7Page( title = "My app", f7SingleLayout( navbar = f7Navbar(title = "f7Picker"), f7Picker( inputId = "mypicker", placeholder = "Some text here!", label = "Picker Input", choices = c('a', 'b', 'c') ), textOutput("pickerval") ) ), server = function(input, output) { output$pickerval <- renderText(input$mypicker) } ) }