View source: R/generics-shiny.R
set_rave_theme | R Documentation |
Set and Return RAVE theme
set_rave_theme(
theme,
.set_default = FALSE,
session = shiny::getDefaultReactiveDomain()
)
theme |
|
.set_default |
whether to save current theme as default, default is no. |
session |
shiny session |
RAVE support two themes: "light" mode and "dark" mode. In "light" mode, the web application background will be light gray and white. In "dark" mode, the application background will be gray and foreground will be white.
If theme
is missing and RAVE is running as web application, then
it is set from current session, otherwise, the default theme is retrieved
from rave_options('default_theme')
. If option "default_theme"
is missing, then it defaults to "light".
theme
under current context.
# Retrieve current theme
get_val(rave_options('default_theme'), default = 'light')
# Set light mode
set_rave_theme('light')
plot(1:10, main = 'test light mode')
# Set dark mode
set_rave_theme('dark')
plot(1:10, main = 'test dark mode')
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.