GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • cli
  • FAQ
  • Reference
  • Building a Semantic CLI
  • From usethis::ui functions to cli
  • cli pluralization
  • Introduction to progress bars in cli
  • Advanced cli progress bars
  • cli color palettes
  • More articles...
  • Changelog

This view

  • Original page
  • New address

GeezerVison is showing cli.r-lib.org — List of items — cli_bullets

List of items

Source: R/bullets.R
cli_bullets.Rd

It is often useful to print out a list of items, tasks a function or package performs, or a list of notes.

Usage

cli_bullets(text, id = NULL, class = NULL, .envir = parent.frame())

Arguments

text

Character vector of items. See details below on how names are interpreted.

id

Optional id of the div.bullets element, can be used in themes.

class

Optional additional class(es) for the div.bullets element.

.envir

Environment to evaluate the glue expressions in.

Details

Items may be formatted differently, e.g. they can have a prefix symbol. Formatting is specified by the names of text, and can be themed. cli creates a div element of class bullets for the whole bullet list. Each item is another div element of class bullet-<name>, where <name> is the name of the entry in text. Entries in text without a name create a div element of class bullet-empty, and if the name is a single space character, the class is bullet-space.

The built-in theme defines the following item types:

  • No name: Item without a prefix.

  • : Indented item.

  • *: Item with a bullet.

  • >: Item with an arrow or pointer.

  • v: Item with a green "tick" symbol, like cli_alert_success().

  • x: Item with a ref cross, like cli_alert_danger().

  • !: Item with a yellow exclamation mark, like cli_alert_warning().

  • i: Info item, like cli_alert_info().

You can define new item type by simply defining theming for the corresponding bullet-<name> classes.

cli_bullets(c(
        "noindent",
  " " = "indent",
  "*" = "bullet",
  ">" = "arrow",
  "v" = "success",
  "x" = "danger",
  "!" = "warning",
  "i" = "info"
))

#> noindent
#>   indent
#> • bullet
#> → arrow
#> ✔ success
#> ✖ danger
#> ! warning
#> ℹ info

See also

This function supports inline markup.

Other functions supporting inline markup: cli_abort(), cli_alert(), cli_blockquote(), cli_bullets_raw(), cli_dl(), cli_h1(), cli_li(), cli_ol(), cli_process_start(), cli_progress_along(), cli_progress_bar(), cli_progress_message(), cli_progress_output(), cli_progress_step(), cli_rule, cli_status(), cli_status_update(), cli_text(), cli_ul(), format_error(), format_inline()

You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.