cli_alert

0th

Percentile

CLI alerts

Alerts are typically short status messages.

Usage
cli_alert(text, id = NULL, class = NULL, wrap = FALSE, .envir = parent.frame())

cli_alert_success( text, id = NULL, class = NULL, wrap = FALSE, .envir = parent.frame() )

cli_alert_danger( text, id = NULL, class = NULL, wrap = FALSE, .envir = parent.frame() )

cli_alert_warning( text, id = NULL, class = NULL, wrap = FALSE, .envir = parent.frame() )

cli_alert_info( text, id = NULL, class = NULL, wrap = FALSE, .envir = parent.frame() )

Arguments
text

Text of the alert.

id

Id of the alert element. Can be used in themes.

class

Class of the alert element. Can be used in themes.

wrap

Whether to auto-wrap the text of the alert.

.envir

Environment to evaluate the glue expressions in.

Aliases
  • cli_alert
  • cli_alert_success
  • cli_alert_danger
  • cli_alert_warning
  • cli_alert_info
Examples
# NOT RUN {
cli_alert("Cannot lock package library.")
cli_alert_success("Package {.pkg cli} installed successfully.")
cli_alert_danger("Could not download {.pkg cli}.")
cli_alert_warning("Internet seems to be unreacheable.")
cli_alert_info("Downloaded 1.45MiB of data")
# }
Documentation reproduced from package cli, version 2.0.1, License: MIT + file LICENSE

Community examples

Looks like there are no examples yet.