Skip to contents

This function wraps commonly used functions to create a Shiny modal for pop-up messages. It allows you to link a triggering event with a message, making it easier to display pop-up messages in Shiny applications with reduced code repetition.

Usage

shiny_modal(trigger, msg, size = "l")

Arguments

trigger

The triggering event that activates the modal.

msg

The message content to be displayed in the modal.

size

The size of the modal ("s" for small, "m" for medium, "l" for large).

Examples

if (FALSE) { # \dontrun{
  # Create a Shiny modal linked to a triggering event with a message
  shiny_modal(trigger = input$button_click, msg = "Process completed successfully!")
} # }