bs4Dash (version 0.5.0)

bs4TabCard: Create a Boostrap 4 tabCard

Description

Build an adminLTE3 card with tabs

Usage

bs4TabCard(
  ...,
  id,
  title = NULL,
  status = NULL,
  elevation = NULL,
  solidHeader = FALSE,
  headerBorder = TRUE,
  gradientColor = NULL,
  tabStatus = NULL,
  width = 6,
  height = NULL,
  collapsible = TRUE,
  collapsed = FALSE,
  closable = TRUE,
  maximizable = FALSE,
  overflow = FALSE,
  side = c("left", "right")
)

tabBox( ..., id, title = NULL, status = NULL, elevation = NULL, solidHeader = FALSE, headerBorder = TRUE, gradientColor = NULL, tabStatus = NULL, width = 6, height = NULL, collapsible = TRUE, collapsed = FALSE, closable = TRUE, maximizable = FALSE, overflow = FALSE, side = c("left", "right") )

Arguments

...

Contents of the box: should be bs4TabPanel.

id

Unique bs4TabSetPanel id.

title

TabCard title.

status

The status of the card header. "primary", "secondary", "success", "warning", "danger", "white", "light", "dark", "transparent". NULL by default.

elevation

tabCard elevation.

solidHeader

Should the header be shown with a solid color background?

headerBorder

Whether to display a border between the header and body. TRUE by default

gradientColor

If NULL (the default), the background of the box will be white. Otherwise, a color string. "primary", "success", "warning" or "danger".

tabStatus

The status of the tabs buttons over header. "primary", "secondary", "success", "warning", "danger", "white", "light", "dark", "transparent". NULL by default, "light" if status is set. A vector is possible with a colour for each tab button

width

The width of the box, using the Bootstrap grid system. This is used for row-based layouts. The overall width of a region is 12, so the default width of 4 occupies 1/3 of that width. For column-based layouts, use NULL for the width; the width is set by the column that contains the box.

height

The height of a box, in pixels or other CSS unit. By default the height scales automatically with the content.

collapsible

If TRUE, display a button in the upper right that allows the user to collapse the box.

collapsed

If TRUE, start collapsed. This must be used with collapsible=TRUE.

closable

If TRUE, display a button in the upper right that allows the user to close the box.

maximizable

If TRUE, the card can be displayed in full screen mode.

overflow

Whether to enable overflow in the card body and footer. FALSE by default.

side

Side of the box the tabs should be on ("left" or "right").

See Also

Other cards: bs4Card(), bs4InfoBox(), bs4ValueBox()

Examples

Run this code
# NOT RUN {
if(interactive()){
 library(shiny)
 library(bs4Dash)

 shiny::shinyApp(
   ui = bs4DashPage(
    navbar = bs4DashNavbar(),
    sidebar = bs4DashSidebar(),
    controlbar = bs4DashControlbar(),
    footer = bs4DashFooter(),
    title = "test",
    body = bs4DashBody(
     bs4TabCard(
      id = "tabcard",
      title = "A card with tabs",
      bs4TabPanel(
       tabName = "Tab 1", 
       active = FALSE,
       "Content 1"
      ),
      bs4TabPanel(
       tabName = "Tab 2", 
       active = TRUE,
       "Content 2"
      ),
      bs4TabPanel(
       tabName = "Tab 3", 
       active = FALSE,
       "Content 3"
      )
     )
    )
   ),
   server = function(input, output) {}
 )
}

# }

Run the code above in your browser using DataCamp Workspace