Learn R Programming

shinyWidgets (version 0.3.4)

dropdown: Dropdown

Description

Create a dropdown menu

Usage

dropdown(..., style = "default", status = "default", size = "md",
  icon = NULL, label = NULL, tooltip = FALSE, right = FALSE,
  up = FALSE, width = NULL, animate = FALSE)

Arguments

...

List of tag to be displayed into the dropdown menu.

style

Character. if default use Bootstrap button (like an actionButton), else use an actionBttn, see argument style for possible values.

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.

animate

Add animation on the dropdown, can be logical or result of animateOptions.

Details

This function is similar to dropdownButton but don't use Boostrap, so you can put pickerInput in it. Moreover you can add animations on the appearance / disappearance of the dropdown with animate.css.

See Also

animateOptions for animation, tooltipOptions for tooltip and actionBttn for the button.

Examples

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

dropdown(
  "Content goes here",
  style = "unite", icon = icon("gear"), status = "danger", width = "300px",
  animate = animateOptions(
    enter = animations$fading_entrances$fadeInLeftBig,
    exit = animations$fading_exits$fadeOutRightBig
  )
)

}
# }

Run the code above in your browser using DataLab