A speech bubble stays visible across mood changes and character swaps.
Plain text is escaped; use htmltools::HTML() only for HTML you trust. A
timed countdown pauses while the mascot is hidden or minimised, while the
pointer is over the bubble, or while keyboard focus is anywhere inside the
mascot, and resumes with the time left. Pressing Escape while
focused inside the mascot closes the bubble. Closing a bubble removes it
until the app supplies a new one. While the bubble shows, the mascot looks
towards it: up when the bubble is above (inline and bottom corners), down
when it is below (top corners).
Arguments
- text
A non-empty string, optionally marked with
htmltools::HTML(), or anhtmltoolstag or tag list. HTML-marked strings and tags are shown as HTML. Tags with dependencies or head content are not supported and give an error.NULL(the default) clears the bubble. Withtext = NULL, settingdurationorclosableyourself is an error; usemascot_bubble()without options to clear the bubble.- ...
Must be empty. Forces the arguments after it to be named.
- duration
How long the bubble stays visible: a number greater than zero, in seconds. Defaults to
5. UseInfto keep the bubble until it is closed, replaced or cleared.- closable
A logical flag, defaulting to
TRUE, to show a close button.FALSEhides the button; the Escape key still closes the bubble.NULLis not accepted.
Details
Use the always visible status line for a short description of the current state.
Use a bubble for a message about something that happened; it may time out.
Use duration = Inf for a message the user must act on, such as an invalid form,
because a timed message can vanish before it is read.
Bubble or menu? A bubble is a message the app shows; the server supplies or
updates it with update_mascot(id, bubble = ...). For an action the visitor
chooses, use mascot_popup_menu() with click = instead.
See also
mascot(), update_mascot(), mascot_popup_menu()
Other mascot helpers:
mascot_action(),
mascot_anchors(),
mascot_character(),
mascot_characters(),
mascot_check_character(),
mascot_colour_roles(),
mascot_families(),
mascot_gesture(),
mascot_gestures(),
mascot_mood(),
mascot_moods(),
mascot_motion_settings(),
mascot_palettes(),
mascot_placement(),
mascot_popup_menu(),
mascot_preview(),
mascot_read_character(),
mascot_size(),
mascot_status(),
mascot_theme()
Examples
mascot_bubble("3 rows skipped")
#> mascot_bubble("3 rows skipped")
mascot_bubble("Ready", duration = Inf)
#> mascot_bubble("Ready", duration = Inf)
mascot_bubble(htmltools::HTML("<strong>Ready</strong>"))
#> mascot_bubble(htmltools::HTML("<strong>Ready</strong>"))
mascot_bubble()
#> mascot_bubble()
