CRAN status R-CMD-check LinkedIn

muiMaterial

muiMaterial brings Material UI, the world’s most popular React UI framework, to R and Shiny.

Why muiMaterial?

Go beyond Bootstrap

If Shiny apps look all the same, it is because most use Bootstrap. muiMaterial replaces it with Material UI’s vast library of components, giving you fully customized dashboards and websites in R.

Launch a basic dashboard (live here):

muiMaterial::muiMaterialExample("dashboard-simple")

Or the R replica of the official MUI dashboard template (live here):

muiMaterial::muiMaterialExample("mui-template-dashboard")

Built for AI

AI tools like Claude, ChatGPT, or GitHub Copilot have been trained on enormous amounts of MUI code. Each MUI component maps directly to an R function: React’s <Button variant="contained" /> becomes Button(variant = "contained") in R. Just ask an AI to generate MUI code and adapt it to R. No React or CSS knowledge needed.

Learn more in the AI-Assisted Development vignette.

Works with Quarto

muiMaterial is not limited to Shiny. You can also use Material UI components in Quarto documents for rich, interactive reports and presentations.

Flexible navigation

Unlike Bootstrap-based packages (bslib, bs4Dash) that lock you into predefined layouts, muiMaterial lets you structure your app however you want. Combine it with reactRouter to build multi-page websites with client-side routing.

Rich ecosystem

Extend functionality with companion R packages:

Quick start

Install the stable version from CRAN:

install.packages("muiMaterial")

Or install the development version from GitHub:

pak::pak("lgnbhl/muiMaterial")
library(shiny)
library(muiMaterial)

ui <- muiMaterialPage(
  CssBaseline(
    Box(
      sx = list(p = 2),
      Typography("Hello Material UI!", variant = "h4")
    )
  )
)

server <- function(input, output, session) {}

shinyApp(ui, server)

Use muiMaterialPage() instead of fluidPage() and wrap your UI in CssBaseline(). Material UI uses its own design system and conflicts with Bootstrap.

For Shiny inputs, server-side rendering, tabs, and styling details, see the Getting Started vignette.

Run the showcase to see some Shiny inputs in action:

muiMaterial::muiMaterialExample("showcase")

Resources

Contributing

Found a bug or have a feature request? Open an issue. Pull requests are welcome.

Follow Felix Luginbuhl on LinkedIn for updates.

License

This package is released under the MIT License.