Learn R Programming

shinyWidgets (version 0.3.4)

dropdownButton: Dropdown Button

Description

Create a dropdown menu with Bootstrap

Usage

dropdownButton(..., circle = TRUE, status = "default", size = "default",
  icon = NULL, label = NULL, tooltip = FALSE, right = FALSE,
  up = FALSE, width = NULL)

Arguments

...

List of tag to be displayed into the dropdown menu.

circle

Logical. Use a circle button

status

Color, must be a valid Bootstrap status : default, primary, info, success, warning, danger.

size

Size of the button : default, lg, sm, xs.

icon

An icon to appear on the button.

label

Label to appear on the button. If circle = TRUE and tooltip = TRUE, label is used in tooltip.

tooltip

Put a tooltip on the button, you can customize tooltip with tooltipOptions.

right

Logical. The dropdown menu starts on the right.

up

Logical. Display the dropdown menu above.

width

Width of the dropdown menu content.

Examples

Run this code
# NOT RUN {
## Only run examples in interactive R sessions
if (interactive()) {

dropdownButton(
 "Your contents goes here ! You can pass several elements",
 circle = TRUE, status = "danger", icon = icon("gear"), width = "300px",
 tooltip = tooltipOptions(title = "Click to see inputs !")
)

}
# }

Run the code above in your browser using DataLab