Skip to contents

f7SingleLayout provides a simple page layout.

Usage

f7SingleLayout(..., navbar, toolbar = NULL, panels = NULL)

Arguments

...

Content.

navbar

Slot for f7Navbar.

toolbar

Slot for f7Toolbar.

panels

Slot for f7Panel. Wrap in tagList if multiple panels.

Author

David Granjon, dgranjon@ymail.com

Examples

if (interactive()) {
  library(shiny)
  library(shinyMobile)
  shinyApp(
    ui = f7Page(
      title = "Single layout",
      f7SingleLayout(
        navbar = f7Navbar(
          title = "Single Layout"
        ),
        toolbar = f7Toolbar(
          position = "bottom",
          f7Link(label = "Link 1", href = "https://www.google.com"),
          f7Link(label = "Link 2", href = "https://www.google.com")
        ),
        # main content
        f7Card(
          title = "Card header",
          f7Slider("obs", "Number of observations", 0, 1000, 500),
          plotOutput("distPlot"),
          footer = tagList(
            f7Button(
              color = "blue",
              label = "My button",
              href = "https://www.google.com"
            ),
            f7Badge("Badge", color = "green")
          )
        )
      )
    ),
    server = function(input, output) {
      output$distPlot <- renderPlot({
        dist <- rnorm(input$obs)
        hist(dist)
      })
    }
  )
}