Pivot {shiny.fluent}R Documentation

Pivot

Description

The Pivot control and related tabs pattern are used for navigating frequently accessed, distinct content categories. Pivots allow for navigation between two or more content views and relies on text headers to articulate the different sections of content.

Tabs are a visual variant of Pivot that use a combination of icons and text or just icons to articulate section content.

For more details and examples visit the official docs. The R package cannot handle each and every case, so for advanced use cases you need to work using the original docs to achieve the desired result.

Usage

Pivot(...)

PivotItem(...)

Arguments

...

Props to pass to the component. The allowed props are listed below in the Details section.

Details

Note that unless you have compelling requirements you should not override aria-label.

Examples: completed (4), Unread (99+)

Note: The 'key' from react props cannot be used inside component.

This property is also mutually exclusive with defaultSelectedKey.

This property is also mutually exclusive with defaultSelectedIndex.

Value

Object with shiny.tag class suitable for use in the UI of a Shiny app.

Examples

library(shiny)
library(shiny.fluent)

ui <- function(id) {
  ns <- NS(id)
  Pivot(
    PivotItem(headerText = "Tab 1", Label("Hello 1")),
    PivotItem(headerText = "Tab 2", Label("Hello 2"))
  )
}

server <- function(id) {
  moduleServer(id, function(input, output, session) {})
}

if (interactive()) {
  shinyApp(ui("app"), function(input, output) server("app"))
}

[Package shiny.fluent version 0.4.0 Index]