
Last chance! 50% off unlimited learning
Sale ends in
Create an f7 select input
f7Select(inputId, label, choices, selected = NULL, width = NULL)
Select input id.
Select input label.
Select input choices.
Select input default selected value.
The width of the input, e.g. 400px
, or 100%
.
# NOT RUN {
if(interactive()){
library(shiny)
library(shinyMobile)
shiny::shinyApp(
ui = f7Page(
title = "My app",
f7SingleLayout(
navbar = f7Navbar(title = "f7Select"),
f7Select(
inputId = "variable",
label = "Choose a variable:",
choices = colnames(mtcars)[-1],
selected = "hp"
),
tableOutput("data")
)
),
server = function(input, output) {
output$data <- renderTable({
mtcars[, c("mpg", input$variable), drop = FALSE]
}, rownames = TRUE)
}
)
}
# }
Run the code above in your browser using DataLab