shinymaterial (version 0.5.3)

material_modal: Place UI content in a modal

Description

Put any UI object inside of a modal. The modal will open when the button is pressed.

Usage

material_modal(modal_id, button_text, title, ..., button_icon = NULL,
  floating_button = FALSE, button_depth = NULL, button_color = NULL,
  close_button_label = "Close", display_button = TRUE)

Arguments

modal_id

String. The ID for the modal. Must be unique per application.

button_text

String. The text displayed on the modal trigger button.

title

String. The title of the modal window.

...

The UI elements to place in the modal

button_icon

String. The name of the icon. Visit http://materializecss.com/icons.html for a list of available icons.

floating_button

Boolean. Should the modal trigger button be a floating button?

button_depth

Integer. The amount of depth of the button. The value should be between 0 and 5. Leave empty for the default depth.

button_color

String. The color of the button. Leave empty for the default color. Visit http://materializecss.com/color.html for a list of available colors.

close_button_label

String. The label of the modal close button.

display_button

Boolean. Should the button be displayed in the app? (If FALSE, open_material_modal() may be used to open the modal).

Examples

Run this code
# NOT RUN {
material_modal(
  modal_id = "example_modal",
  button_text = "Modal",
  title = "Example Modal Title",
  button_color = "red lighten-3",
  shiny::tags$p("Modal Content")
)
# }

Run the code above in your browser using DataCamp Workspace