accordion: Generates an 'accordion' tab-set

View source: R/accordion.R

accordionR Documentation

Generates an 'accordion' tab-set

Description

Generates an 'accordion' tab-set that only one tab is expanded at a time. This feature is experimental and has bugs in some situations. Please use it at your own risk.

Usage

accordion(
  ...,
  id = rand_string(),
  class = NULL,
  style_header = NULL,
  style_body = NULL,
  env = parent.frame(),
  extras = list(),
  root_path = template_root()
)

Arguments

...

'accordion' items, generated by accordion_item

id

the element id, must be unique

class

the additional 'HTML' class

style_header

additional 'CSS' styles for header

style_body

additional 'CSS' styles for content body

env

environment to evaluate ...

extras

key-value pairs that overrides the parameters in accordion_item

root_path

see template_root

Value

'shiny.tag.list' 'HTML' tags

See Also

accordion_item

Examples


library(shiny)
library(shidashi)

accordion(
  id = "input-set",
  accordion_item(
    title = "Input Group A",
    textInput("input_1", "Input 1"),
    collapsed = FALSE,
    footer = "Anim pariatur cliche reprehenderit dolor brunch.",
    tools = list(
      as_badge("New|badge-danger")
      # card_tool(widget = "collapse")
    )
  ),
  accordion_item(
    title = "Input Group B",
    textInput("input_2", "Input 2"),
    footer = actionButton("btn1", "OK"),
    collapsed = FALSE,
    tools = list(
      card_tool(widget = "link",
                icon = shiny::icon("question-circle"),
                href = "#")
    )
  )
)


shidashi documentation built on June 21, 2022, 5:05 p.m.