miniTitleBar: Create a title bar

Description Usage Arguments Details See Also Examples

Description

Creates a title bar for a Shiny app or Shiny Gadget. Intended to be used with miniPage. Title bars contain a title, and optionally, a miniTitleBarButton on the left and/or right sides.

Usage

1
2
3
4
5
6
7
8
9
miniTitleBar(title, left = NULL, right = NULL)

gadgetTitleBar(title, left = miniTitleBarCancelButton(),
  right = miniTitleBarButton("done", "Done", primary = TRUE))

miniTitleBarButton(inputId, label, primary = FALSE)

miniTitleBarCancelButton(inputId = "cancel", label = "Cancel",
  primary = FALSE)

Arguments

title

The title of the gadget. If this needs to be dynamic, pass textOutput with inline = TRUE.

left

The miniTitleBarButton to put on the left, or NULL for none.

right

The miniTitleBarButton to put on the right, or NULL for none.

inputId

The input slot that will be used to access the button.

label

The text label to display on the button.

primary

If TRUE, render the button in a bold color to indicate that it is the primary action of the gadget.

Details

gadgetTitleBar is a miniTitleBar with different defaults: a Cancel button on the left and a Done button on the right. By default, runGadget will handle the Cancel button by closing the gadget and raising an error, but the Done button must be handled by the gadget author using observeEvent(input$done, {...}).

miniTitleBarCancelButton is like miniTitleBarButton, but the user can also invoke it by hitting the Escape key.

See Also

For more information, see the Designing Gadget UI article on shiny.rstudio.com.

Examples

1
2
3
4
miniTitleBar("My App",
  left = miniTitleBarButton("prev", "Previous"),
  right = miniTitleBarButton("next", "Next")
)

miniUI documentation built on May 1, 2019, 11:03 p.m.