The studio guide for mascot_studio().
The same page is read in the mascot studio.
mascot::mascot_studio(fn = "mascot_studio")
It opens on this function's guide; change a control and watch the mascot.
Open a useful starting point
Launch the studio from an interactive R console:
mascot::mascot_studio()
mascot::mascot_studio(fn = "mascot_theme")Use fn without parentheses to start on a particular
function’s Guide. Leaving it at NULL opens
mascot_mood. Choose a character with
character:
mascot::mascot_studio(character = "tessa")
Three views, one app
view |
Starting point |
|---|---|
"studio" |
The studio: every function, with a live mascot and controls. |
"examples" |
The bundled example gallery, with source code and launch calls. |
"theme" |
Theme a mascot: a palette, your own colours or your brand’s for one character, with the code to copy. |
mascot::mascot_studio(view = "examples")
mascot::mascot_studio(view = "theme")The studio and examples views share one interface. The view chooses
what it shows first; fn chooses the Guide function in the
studio view. Choose “Preview page” under “Host mode” to compare moods
and sizes as mascot_preview() draws them. The theme view is
a page of its own, also opened by mascot_example("theme")
and from the studio’s More menu.
Inspect without launching
app <- mascot::mascot_studio(fn = "mascot_theme", run = FALSE)
inherits(app, "shiny.appobj")This returns TRUE: run = FALSE gives you an
app object rather than opening a server. By contrast,
mascot_example(..., run = FALSE) gives a file path.
What to look at first
Start with a mood change and its status text. Then compare a palette in light and dark modes, and try the motion switches. Use the Guide for worked explanations, Help for the function reference, and the generated code when adapting a choice to your own app.
The studio works offline with mascot, Shiny and the optional packages bslib and knitr available locally. Its interface is experimental, so revisit the generated code when upgrading.
Warnings, errors and common mistakes
mascot_studio(view = "unknown-view", run = FALSE)
