Learn R Programming

shinyMobile (version 0.1.0)

f7Tabs: Create a Framework7 tabs

Description

Build a Framework7 tabs

Usage

f7Tabs(..., .items = NULL, id = NULL, swipeable = FALSE, animated = TRUE)

Arguments

...

Slot for f7Tab.

.items

Slot for other items that could be part of the toolbar such as buttons or f7Sheet.

id

Optional to get the id of the currently selected f7Tab.

swipeable

Whether to allow finger swip. FALSE by default. Only for touch-screens. Not compatible with animated.

animated

Whether to show transition between tabs. TRUE by default. Not compatible with swipeable.

Examples

Run this code
# 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