djpr_tab_panel: Creates a 'shiny::tabPanel()' that includes a table of...

View source: R/djpr_tab_panel.R

djpr_tab_panelR Documentation

Creates a shiny::tabPanel() that includes a table of contents, using toc_row()

Description

Creates a shiny::tabPanel() that includes a table of contents, using toc_row()

Usage

djpr_tab_panel(title, ..., toc_space = 2, right_space = toc_space)

Arguments

title

The title of the panel

...

The content of the panel, passed to toc_row()

toc_space

Numeric; width (out of a total of 12) to be given to the left area that incldues the table of contents

right_space

Numeric; width for the right whitespace; default is the same as toc_space

Details

Intended for use inside djpr_page().

Value

A shiny.tag object; a tabPanel.

Examples

## Not run: 
library(shiny)

example_panel <- djpr_tab_panel(
  title = "Example",
  h1("A heading"),
  "Lorem ipsum",
  h2("A subheading"),
  "Lorem ipsum",
  h1("Another heading")
)

ui <- djpr_page(
  title = "Example",
  example_panel
)

server <- function(input, output, session) {

}

shinyApp(ui, server)

## End(Not run)


djpr-data/djprshiny documentation built on May 14, 2023, 1:15 p.m.