Last chance! 50% off unlimited learning
Sale ends in
Build a Framework7 tabs
f7Tabs(..., .items = NULL, id = NULL, swipeable = FALSE, animated = TRUE)
Slot for f7Tab.
Slot for other items that could be part of the toolbar such as buttons or f7Sheet.
Optional to get the id of the currently selected f7Tab.
Whether to allow finger swip. FALSE by default. Only for touch-screens. Not compatible with animated.
Whether to show transition between tabs. TRUE by default. Not compatible with swipeable.
# NOT RUN {
if (interactive()) {
library(shiny)
library(shinyMobile)
shiny::shinyApp(
ui = f7Page(
title = "Tab Layout",
f7TabLayout(
navbar = f7Navbar(title = HTML(paste("Currently selected:", textOutput("selected")))),
f7Tabs(
id = "tabdemo",
swipeable = TRUE,
animated = FALSE,
f7Tab(tabName = "Tab 1", "tab 1 text"),
f7Tab(tabName = "Tab 2", "tab 2 text"),
f7Tab(tabName = "Tab 3", "tab 3 text"),
.items = shiny::tags$a(
class = "tab-link",
href = "#",
f7Icon("bolt_fill"),
shiny::span(class = "tabbar-label", "Optional Item")
)
)
)
),
server = function(input, output) {
output$selected <- renderText(input$tabdemo)
}
)
}
# }
Run the code above in your browser using DataLab