The studio guide for mascot_placement().
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_placement")
It opens on this function's guide; change a control and watch the mascot.
Placement
A default mascot() floats in the bottom-right corner. Inline placement puts the mascot where mascot() is placed in your UI and scrolls with the page. The map shows the four floating corners and the inline option.
inline
top-left
top-right
bottom-left
bottom-right
mascot("helper")
mascot("helper", placement = "inline")
mascot("helper", placement = mascot_placement("top-left", minimise = TRUE))In a rendered Quarto page there is no server: use
placement = "inline" in an R chunk, give each mascot its
own id, and see “Quarto pages” in the Get started
article.
Warnings, errors and common mistakes
mascot_placement("unknown-position")
mascot_placement("inline", minimise = TRUE)
