Learn R Programming

muiMaterial

muiMaterial brings Material UI, the popular React components library, to R and Shiny.

Why using it?

Give your dashboards a unique look

Want to go beyond the standardised layout used by most Shiny dashboards?

If Shiny apps look all the same, it is because most use Bootstrap. Replacing it with Material UI will take your dashboards to the next level.

Developed by the company MUI, Material UI is probably the most popular React components library globally. muiMaterial allows access to its vast library of UI tools, so you can create fully customized dashboards and websites in R.

For example, launch a basic dashboard:

# remotes::install_github("lgnbhl/muiMaterial")
muiMaterial::muiMaterialExample("dashboard-simple")

Or have a look at the R replica of the official MUI dashboard template:

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

Building custom components easily

Creating custom UI elements is simple. Here’s an example of a stat card:

Card(
  sx = list(p = 3),
  Typography("Material UI weekly downloads", variant = "h6", gutterBottom = TRUE),
  Typography("5.8M", variant = "h3", fontWeight = "bold")
)

Material UI’s component library makes customization intuitive. Just compose components like building blocks.

Flexible Navigation

With the reactRouter R package, you can build a complex and multi-page websites thanks to client-side routing.

You are not blocked in standardized Shiny layouts, like in Bootstrap’s based R packages such as bslib or bs4Dash.

Rich Ecosystem

Extend functionality with companion R packages:

  • muiDataGrid (COMING SOON) - Professional data tables with filtering, sorting, and inline editing
  • muiCharts (COMING SOON) - Beautiful, responsive charts
  • muiDateTimePickers (COMING SOON) - UI components for selecting dates, times, and ranges
  • muiTreeView - Interactive tree navigation

Quick start

Installation

#remotes::install_github("lgnbhl/reactRouter") # dev version
install.packages("muiMaterial")

Your first Material UI app

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)

Important: Use muiMaterialPage() instead of fluidPage() and wrap your UI in CssBaseline() to ensure proper styling. Material UI uses its own design system and conflicts with Bootstrap.

Shiny Input Wrappers

Material UI components become Shiny inputs with *.shinyInput() wrappers. For example, use Button.shinyInput() instead of Button() to capture user interactions in Shiny.

Explore available Shiny inputs with:

muiMaterial::muiMaterialExample("showcase")

Server side Shiny rendering

When rendering components from the server, use shiny::renderUI() or shiny.react::renderReact() in your server function, and shiny::uiOutput() or shiny.react::reactOutput() in your UI.

Creating tabs

Use TabContext.shinyInput(), TabList.shinyInput(), and TabPanel.shinyInput() instead of the basic Tabs() component (which currently doesn’t work). See full example.

For more advanced use cases, it is preferabe to use client-side routing with reactRouter.

Styling with sx

Customize any component using the sx argument for inline CSS-in-JS styling. It’s more powerful and maintainable than traditional CSS.

Full documentation

All the docs with examples are here.

Contributing

Found a bug or have a feature request? Open an issue at https://github.com/lgnbhl/muiMaterial

More Information

Follow Felix Luginbuhl on LinkedIn for updates.

Copy Link

Version

Install

install.packages('muiMaterial')

Version

0.1.2

License

MIT + file LICENSE

Maintainer

F<c3><a9>lix Luginbuhl

Last Published

January 26th, 2026

Functions in muiMaterial (0.1.2)

Badge

Badge
ButtonGroup

ButtonGroup
Backdrop

Backdrop
BottomNavigation

BottomNavigation
BottomNavigationAction

BottomNavigationAction
Box

Box
Button

Button
Breadcrumbs

Breadcrumbs
Card

Card
ButtonBase

ButtonBase
Chip

Chip
CircularProgress

CircularProgress
ClickAwayListener

ClickAwayListener
CardActionArea

CardActionArea
Checkbox

Checkbox
CardMedia

CardMedia
CardContent

CardContent
Collapse

Collapse
Drawer

Drawer
CardActions

CardActions
Fab

Fab
Dialog

Dialog
DialogTitle

DialogTitle
Divider

Divider
DialogContent

DialogContent
CardHeader

CardHeader
Container

Container
CssBaseline

CssBaseline
DialogContentText

DialogContentText
FormControl

FormControl
FilledInput

FilledInput
DialogActions

DialogActions
Fade

Fade
FormGroup

FormGroup
FormHelperText

FormHelperText
FormControlLabel

FormControlLabel
Grid

Grid
GridLegacy

GridLegacy
GlobalStyles

GlobalStyles
ImageListItem

ImageListItem
InputLabel

InputLabel
InputBase

InputBase
ImageListItemBar

ImageListItemBar
IconButton

IconButton
FormLabel

FormLabel
ImageList

ImageList
Link

Link
ListItemText

ListItemText
ListItem

ListItem
LinearProgress

LinearProgress
List

List
ListSubheader

ListSubheader
Input

Input
ListItemSecondaryAction

ListItemSecondaryAction
InputAdornment

InputAdornment
ListItemIcon

ListItemIcon
OutlinedInput

OutlinedInput
NoSsr

NoSsr
NativeSelect

NativeSelect
Grow

Grow
RadioGroup

RadioGroup
Radio

Radio
Portal

Portal
Popper

Popper
Masonry

Masonry
Icon

Icon
Menu

Menu
ListItemAvatar

ListItemAvatar
Pagination

Pagination
Slide

Slide
PigmentGrid

PigmentGrid
PigmentContainer

PigmentContainer
MenuItem

MenuItem
MenuList

MenuList
ListItemButton

ListItemButton
SvgIcon

SvgIcon
PaginationItem

PaginationItem
Stepper

Stepper
Paper

Paper
PigmentStack

PigmentStack
Popover

Popover
MobileStepper

MobileStepper
Modal

Modal
Snackbar

Snackbar
SpeedDial

SpeedDial
SpeedDialAction

SpeedDialAction
SnackbarContent

SnackbarContent
SwipeableDrawer

SwipeableDrawer
Switch

Switch
TableSortLabel

TableSortLabel
TableRow

TableRow
ToggleButtonGroup

ToggleButtonGroup
Rating

Rating
TableContainer

TableContainer
TabList

TabList
TableFooter

TableFooter
TabPanel

TabPanel
StepLabel

StepLabel
StepIcon

StepIcon
Slider

Slider
TableBody

TableBody
Select

Select
muiMaterialPage

HTML body without Bootstrap and margins
ScopedCssBaseline

ScopedCssBaseline
StepConnector

StepConnector
TimelineItem

TimelineItem
StepContent

StepContent
TimelineOppositeContent

TimelineOppositeContent
reexports

Objects exported from other packages
Step

Step
StepButton

StepButton
TabScrollButton

TabScrollButton
Table

Table
ThemeProvider

ThemeProvider
Timeline

Timeline
TextareaAutosize

TextareaAutosize
TimelineConnector

TimelineConnector
SpeedDialIcon

SpeedDialIcon
Stack

Stack
Tab

Tab
TimelineContent

TimelineContent
TablePagination

TablePagination
Skeleton

Skeleton
TableHead

TableHead
TableCell

TableCell
TimelineDot

TimelineDot
muiMaterialExample

Run muiMaterial example
muiMaterialDependency

Mui Charts UI JS dependency
component

Documentation template for remaining components
Zoom

Zoom
TabContext

TabContext
TextField

TextField
TimelineSeparator

TimelineSeparator
Tabs

Tabs
ToggleButton

ToggleButton
Toolbar

Toolbar
Typography

Typography
Tooltip

Tooltip
shinyInput

Documentation template for components with `.shinyInput` wrappers
Avatar

Avatar
AlertTitle

AlertTitle
Autocomplete

Autocomplete
AccordionSummary

AccordionSummary
AppBar

AppBar
AvatarGroup

AvatarGroup
Alert

Alert
AccordionDetails

AccordionDetails
Accordion

Accordion
AccordionActions

AccordionActions