powered by
Put any UI object inside of a modal. The modal will open when the button is pressed.
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 )
String. The ID for the modal. Must be unique per application.
String. The text displayed on the modal trigger button.
String. The title of the modal window.
The UI elements to place in the modal
String. The name of the icon. Visit https://materializecss.com/icons.html for a list of available icons.
Boolean. Should the modal trigger button be a floating button?
Integer. The amount of depth of the button. The value should be between 0 and 5. Leave empty for the default depth.
String. The color of the button. Leave empty for the default color. Visit https://materializecss.com/color.html for a list of available colors.
String. The label of the modal close button.
Boolean. Should the button be displayed in the app? (If FALSE, open_material_modal() may be used to open the modal).
# 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 DataLab