Creates a Material UI page without Bootstrap and with 0 margin in body by default. You can choose to use Google Roboto font as well as Google icons fonts with the `Icon()` component.
Usage
muiMaterialPage(
...,
useFontRoboto = FALSE,
useMaterialIconsFilled = FALSE,
useMaterialIconsOutlined = FALSE,
useMaterialIconsRounded = FALSE,
useMaterialIconsTwoTones = FALSE,
suppressBootstrap = TRUE,
styleBody = "margin:0",
debugReact = FALSE
)Arguments
- ...
The contents of the document body.
- useFontRoboto
Use Google Roboto font CDN in head, FALSE by default.
- useMaterialIconsFilled
Use Google icons CDN in head to use `Icon()` component, FALSE by default.
- useMaterialIconsOutlined
Use Google icons CDN in head to use `Icon()` component, FALSE by default.
- useMaterialIconsRounded
Use Google icons CDN in head to use `Icon()` component, FALSE by default.
- useMaterialIconsTwoTones
Use Google icons CDN in head to use `Icon()` component, FALSE by default.
- suppressBootstrap
Whether to suppress Bootstrap. TRUE by default.
- styleBody
CSS declarations applied to the document body via a `body ... ` style rule, `"margin:0"` by default.
- debugReact
Whether to enable react debug mode. FALSE by default.
Value
A browsable `htmltools` tag list which can be passed as the UI of a Shiny app or rendered standalone (e.g. with `htmltools::save_html()`). Head content (meta tags, font links, the body style rule) is emitted via `htmltools::tags$head()` and hoisted into the document head at render time.
Details
The Bootstrap library is suppressed by default, as it doesn't work well with Material UI in general. The full set of available Material Icon names is at <https://fonts.google.com/icons?icon.set=Material+Icons>.
Examples
if (FALSE) { # interactive()
library(shiny)
library(muiMaterial)
ui <- muiMaterialPage(
useFontRoboto = TRUE,
useMaterialIconsFilled = TRUE,
Box(
sx = list(p = 2),
Typography("Hello Material UI!", variant = "h4"),
Icon("home")
)
)
shinyApp(ui, function(input, output, session) {})
}
