Show information about an app during launch such as a 'welcome/what to do' toast message.

appintro(title, message, logo = NULL, logo_position = "title",
  type = "toast", toast_type = "info", heading_size = "h2",
  toast_args = list(timeOut = 10000, extendedTimeOut = 10000, position =
  "top-center", closeButton = TRUE, preventDuplicates = TRUE))

Arguments

title

character.

message

plain character string or, typically, one wrapping an html snippet.

logo

the src character string for an image.

logo_position

character, "title" or "message". The logo is comes after and is floated to the right of either the title or the message body.

type

whether to return a "toast" message using shinytoastr (default) or plain "html" as a character string.

toast_type

if type = "toast", the toast background color is set by specifying one of "info" (default), "success", "warning" or "error".

heading_size

character, wrap the title in html heading tags, defaults to "h2".

toast_args

a list of additional arguments (after title and message) to pass to shinytoastr::toast_*.

Value

a shiny::toastr::toast_* object by default. Alternatively, a character string of html.

Details

The list toast_args has the following defaults: timeOut = 10000, extendedTimeOut = timeOut, position = "top-center", closeButton = TRUE and preventDuplicates=TRUE. If another list is provided, but does not include some of these five arguments, they will be retained as defaults. Note that this function depends heavily on associated custom CSS. For example, if your message body is very large, it will not fit in the toast box unless additional css overrides are included in your app for size and position. Use with care and see this following GitHub gist for details.

Examples

#not run