The studio guide for mascot(). 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")
It opens on this function's guide; change a control and watch the mascot.
Two calls, one id
Put mascot("helper") in the UI, then use the same id in
the server to change its mood. In a module, namespace the UI id with
ns(); the module server uses the local id.
Warnings, errors and common mistakes
mascot("has spaces")
mascot("helper", click = c(help = "Help"))
mascot("helper", character = "tessa", theme = "lilac_violet")
mascot() errors and lists this character's palettes. The hint names another character that has this id; each palette belongs to its own character.
mascot("helper", character = "tessa", theme = "zzzzzz")
mascot() errors and lists this character's palettes. No character has this id, so there is no borrowed-palette hint.
