Skip to contents

The studio guide for mascot_mood(). The same page is read in the mascot studio.

Try it live. The mascot studio shows this function with live controls and the generated code. In an R session with the optional packages bslib and knitr installed, run:
mascot::mascot_studio(fn = "mascot_mood")
It opens on this function's guide; change a control and watch the mascot.

The 5 moods

name description status shared fallback
idle At rest; the starting mood. Idle TRUE NA
thinking Working on something, such as a long calculation. Thinking TRUE NA
happy Something went well. Happy TRUE NA
worried Something needs attention, such as an invalid field. Worried TRUE NA
celebrating A big success, such as a finished task. Celebrating TRUE NA

The mood never speaks alone. The status line under the mascot shows the character’s line for the mood (or your custom text), so screen readers and anyone who cannot read facial expressions still get the meaning.

Warnings, errors and common mistakes

mascot("helper", character = "tessa", mood = mascot_mood("sleepy"))
Error: could not find function "mascot"