inst/examples/mui-template-dashboard/modules/fct_AppTheme.R

# https://github.com/mui/material-ui/blob/v6.3.1/docs/data/material/getting-started/templates/shared-theme/AppTheme.js

fct_AppTheme <- function(..., theme_dark = TRUE){
  ThemeProvider(
    theme = list(
      colorSchemes = list(
        dark = theme_dark
      ),
      cssVariables = list(
        colorSchemeSelector = 'data-mui-color-scheme',
        cssVarPrefix = 'template'
      ),
      typography = themePrimitivesTypography(),
      shape = themePrimitivesShape(),
      colorSchemes = themePrimitivesColorSchemes()
    ),
    disableTransitionOnChange = TRUE,
    ...
  )
}

Try the muiMaterial package in your browser

Any scripts or data that you put into this service are public.

muiMaterial documentation built on Jan. 26, 2026, 5:07 p.m.