Package {muiMaterial}


Type: Package
Title: 'Material UI' for 'shiny' Apps and 'Quarto'
Version: 0.2.0
Maintainer: Felix Luginbuhl <felix.luginbuhl@protonmail.ch>
Description: Wraps the 'Material UI' React components https://mui.com/ for use in R, 'shiny' applications and 'quarto' documents, including inputs, layouts, navigation, and surfaces. All inputs come with R usage examples.
License: MIT + file LICENSE
Encoding: UTF-8
Language: en-US
Depends: R (≥ 4.1)
Imports: checkmate (≥ 2.0.0), htmltools (≥ 0.5.0), shiny (≥ 1.7.0), shiny.react (≥ 0.4.0)
Suggests: knitr, reactRouter (≥ 0.2.0), shiny.router, testthat (≥ 3.0.0)
RoxygenNote: 7.3.3
URL: https://felixluginbuhl.com/muiMaterial/
BugReports: https://github.com/lgnbhl/muiMaterial/issues
Config/testthat/edition: 3
Collate: 'aaa-utils.R' 'ThemeProvider.R' 'browse.R' 'components-extra.R' 'components.R' 'docs-templates.R' 'documentation.R' 'inputs.R' 'muiMaterial-package.R' 'muiMaterialDependency.R' 'muiMaterialExample.R' 'muiMaterialPage.R' 'reexports.R' 'static-tabs.R' 'triggerId.R'
NeedsCompilation: no
Packaged: 2026-06-04 15:05:54 UTC; felix
Author: Felix Luginbuhl ORCID iD [aut, cre, cph], MUI [cph] (Copyright holder of the bundled '@mui/material', '@mui/lab', '@mui/system' and '@mui/utils' JavaScript libraries), Emotion team [cph] (Copyright holder of the bundled '@emotion/react' and '@emotion/styled' JavaScript libraries), Meta Platforms, Inc. and affiliates [cph] (Copyright holder of the bundled 'react-is' JavaScript library; 'react' and 'react-dom' are declared as peer dependencies and provided at runtime by 'shiny.react')
Repository: CRAN
Date/Publication: 2026-06-04 15:20:01 UTC

muiMaterial: Material UI for Shiny and Quarto

Description

'muiMaterial' is a thin R wrapper around the [Material UI](https://mui.com/material-ui/getting-started/) React component library, exposed for Shiny applications and Quarto documents via [shiny.react][shiny.react::shiny.react].

Function naming convention

The package deliberately mirrors the MUI JavaScript API:

'<Component>()'

PascalCase, e.g. [Button()], [Box()], [Typography()]. These produce a React element you can drop into the UI of a Shiny app or a Quarto document. They are not bound to Shiny's input system.

'<Component>.shinyInput()'

The dotted suffix marks the *Shiny-wired* variant. These accept an 'inputId' and report their value back to the Shiny server as 'input[[inputId]]'. The matching 'update<Component>.shinyInput()' mutates the component from the server.

'<Component>.triggerId()'

Variants of overlay components (Drawer, Dialog, Menu, Modal, Popover, SwipeableDrawer) that bind to an existing DOM element by id. Open/close state is managed entirely client-side, so they work in Shiny apps, Quarto documents and static HTML without any server logic.

The dot suffix ('.shinyInput', '.triggerId') is intentional: it groups related families together in autocompletion ('Button.<TAB>' surfaces 'Button.shinyInput', 'updateButton.shinyInput', etc.) without shadowing the corresponding MUI component. These functions are regular R functions, **not** S3 methods.

Getting started

Wrap your UI in [muiMaterialPage()] (or include a [muiMaterialDependency()] manually) and start composing components. See https://felixluginbuhl.com/muiMaterial/articles/ for a full walkthrough.

Author(s)

Maintainer: Felix Luginbuhl felix.luginbuhl@protonmail.ch (ORCID) [copyright holder]

Other contributors:

See Also

Useful links:


Accordion

Description

https://mui.com/material-ui/api/accordion/

Usage

Accordion(...)

Arguments

...

Props to pass to the component.

Details

Value

Object with shiny.tag class suitable for use in the UI of a Shiny app.


AccordionActions

Description

https://mui.com/material-ui/api/accordion-actions/

Usage

AccordionActions(...)

Arguments

...

Props to pass to the component.

Details

Value

Object with shiny.tag class suitable for use in the UI of a Shiny app.


AccordionDetails

Description

https://mui.com/material-ui/api/accordion-details/

Usage

AccordionDetails(...)

Arguments

...

Props to pass to the component.

Details

Value

Object with shiny.tag class suitable for use in the UI of a Shiny app.


AccordionSummary

Description

https://mui.com/material-ui/api/accordion-summary/

Usage

AccordionSummary(...)

Arguments

...

Props to pass to the component.

Details

Value

Object with shiny.tag class suitable for use in the UI of a Shiny app.


Alert

Description

https://mui.com/material-ui/api/alert/

Usage

Alert(...)

Arguments

...

Props to pass to the component.

Details

Value

Object with shiny.tag class suitable for use in the UI of a Shiny app.


AlertTitle

Description

https://mui.com/material-ui/api/alert-title/

Usage

AlertTitle(...)

Arguments

...

Props to pass to the component.

Details

Value

Object with shiny.tag class suitable for use in the UI of a Shiny app.


AppBar

Description

https://mui.com/material-ui/api/app-bar/

Usage

AppBar(...)

Arguments

...

Props to pass to the component.

Details

Value

Object with shiny.tag class suitable for use in the UI of a Shiny app.


Autocomplete

Description

https://mui.com/material-ui/api/autocomplete/

MUI's Autocomplete requires a renderInput function prop, which R cannot express directly. The R wrapper resolves the input in this order:

  1. renderInput — pass an explicit JS() callback for full control.

  2. A child element (e.g. TextField(...), OutlinedInput(...)) — it is cloned and receives the params from MUI automatically. This is the recommended path: it stays close to the MUI API and survives upstream changes without touching R user code.

  3. inputProps — a named list of props forwarded to a default TextField. Kept for backward compatibility with older examples.

Usage

Autocomplete(...)

Autocomplete.shinyInput(inputId, ..., value = NULL)

updateAutocomplete.shinyInput(
  session = shiny::getDefaultReactiveDomain(),
  inputId,
  ...
)

Arguments

...

Props to pass to the component.

inputId

ID of the component.

value

Starting value.

session

Object passed as the 'session' argument to Shiny server.

Details

Value

Object with shiny.tag class suitable for use in the UI of a Shiny app.

Examples


library(shiny)
library(muiMaterial)

ui <- muiMaterialPage(
  CssBaseline(),
  Autocomplete.shinyInput(
    inputId = "auto",
    options = c("Apple", "Banana", "Cherry"),
    TextField(label = "Fruit")
  ),
  verbatimTextOutput("out")
)

server <- function(input, output, session) {
  output$out <- renderPrint(input$auto)
}

shinyApp(ui, server)


Avatar

Description

https://mui.com/material-ui/api/avatar/

Usage

Avatar(...)

Arguments

...

Props to pass to the component.

Details

Value

Object with shiny.tag class suitable for use in the UI of a Shiny app.


AvatarGroup

Description

https://mui.com/material-ui/api/avatar-group/

Usage

AvatarGroup(...)

Arguments

...

Props to pass to the component.

Details

Value

Object with shiny.tag class suitable for use in the UI of a Shiny app.


Backdrop

Description

https://mui.com/material-ui/api/backdrop/

Usage

Backdrop(...)

Arguments

...

Props to pass to the component.

Details

Value

Object with shiny.tag class suitable for use in the UI of a Shiny app.


Badge

Description

https://mui.com/material-ui/api/badge/

Usage

Badge(...)

Arguments

...

Props to pass to the component.

Details

Value

Object with shiny.tag class suitable for use in the UI of a Shiny app.


BottomNavigation

Description

https://mui.com/material-ui/api/bottom-navigation/

Usage

BottomNavigation(...)

BottomNavigation.shinyInput(inputId, ..., value = defaultValue)

updateBottomNavigation.shinyInput(
  session = shiny::getDefaultReactiveDomain(),
  inputId,
  ...
)

Arguments

...

Props to pass to the component.

inputId

ID of the component.

value

Starting value.

session

Object passed as the 'session' argument to Shiny server.

Details

Value

Object with shiny.tag class suitable for use in the UI of a Shiny app.

Note

Give each child BottomNavigationAction a value; the selected action's value is reported to input[[inputId]]. Pass an initial value matching one of them to pre-select it; when omitted, the component mounts with nothing selected (value = FALSE).


BottomNavigationAction

Description

https://mui.com/material-ui/api/bottom-navigation-action/

Usage

BottomNavigationAction(...)

Arguments

...

Props to pass to the component.

Details

Value

Object with shiny.tag class suitable for use in the UI of a Shiny app.


Box

Description

https://mui.com/material-ui/api/box/

Usage

Box(...)

Arguments

...

Props to pass to the component.

Details

Value

Object with shiny.tag class suitable for use in the UI of a Shiny app.


Description

https://mui.com/material-ui/api/breadcrumbs/

Usage

Breadcrumbs(...)

Arguments

...

Props to pass to the component.

Details

Value

Object with shiny.tag class suitable for use in the UI of a Shiny app.


Button

Description

https://mui.com/material-ui/api/button/

Usage

Button(...)

Button.shinyInput(inputId, ...)

updateButton.shinyInput(
  session = shiny::getDefaultReactiveDomain(),
  inputId,
  ...
)

Arguments

...

Props to pass to the component.

inputId

ID of the component.

session

Object passed as the 'session' argument to Shiny server.

Details

Value

Object with shiny.tag class suitable for use in the UI of a Shiny app.

Examples


library(shiny)
library(muiMaterial)

ui <- muiMaterialPage(
  Button.shinyInput("btn", "Click me", variant = "contained"),
  verbatimTextOutput("count")
)

server <- function(input, output, session) {
  output$count <- renderPrint(input$btn)
}

shinyApp(ui, server)


ButtonBase

Description

https://mui.com/material-ui/api/button-base/

Usage

ButtonBase(...)

Arguments

...

Props to pass to the component.

Details

Value

Object with shiny.tag class suitable for use in the UI of a Shiny app.


ButtonGroup

Description

https://mui.com/material-ui/api/button-group/

Usage

ButtonGroup(...)

Arguments

...

Props to pass to the component.

Details

Value

Object with shiny.tag class suitable for use in the UI of a Shiny app.


Card

Description

https://mui.com/material-ui/api/card/

Usage

Card(...)

Arguments

...

Props to pass to the component.

Details

Value

Object with shiny.tag class suitable for use in the UI of a Shiny app.


CardActionArea

Description

https://mui.com/material-ui/api/card-action-area/

Usage

CardActionArea(...)

Arguments

...

Props to pass to the component.

Details

Value

Object with shiny.tag class suitable for use in the UI of a Shiny app.


CardActions

Description

https://mui.com/material-ui/api/card-actions/

Usage

CardActions(...)

Arguments

...

Props to pass to the component.

Details

Value

Object with shiny.tag class suitable for use in the UI of a Shiny app.


CardContent

Description

https://mui.com/material-ui/api/card-content/

Usage

CardContent(...)

Arguments

...

Props to pass to the component.

Details

Value

Object with shiny.tag class suitable for use in the UI of a Shiny app.


CardHeader

Description

https://mui.com/material-ui/api/card-header/

Usage

CardHeader(...)

Arguments

...

Props to pass to the component.

Details

Value

Object with shiny.tag class suitable for use in the UI of a Shiny app.


CardMedia

Description

https://mui.com/material-ui/api/card-media/

Usage

CardMedia(...)

Arguments

...

Props to pass to the component.

Details

Value

Object with shiny.tag class suitable for use in the UI of a Shiny app.


Checkbox

Description

https://mui.com/material-ui/api/checkbox/

Usage

Checkbox(...)

Checkbox.shinyInput(inputId, ..., value = defaultValue)

updateCheckbox.shinyInput(
  session = shiny::getDefaultReactiveDomain(),
  inputId,
  ...
)

Arguments

...

Props to pass to the component.

inputId

ID of the component.

value

Starting value.

session

Object passed as the 'session' argument to Shiny server.

Details

Value

Object with shiny.tag class suitable for use in the UI of a Shiny app.


Chip

Description

https://mui.com/material-ui/api/chip/

Usage

Chip(...)

Arguments

...

Props to pass to the component.

Details

Value

Object with shiny.tag class suitable for use in the UI of a Shiny app.


CircularProgress

Description

https://mui.com/material-ui/api/circular-progress/

Usage

CircularProgress(...)

Arguments

...

Props to pass to the component.

Details

Value

Object with shiny.tag class suitable for use in the UI of a Shiny app.


ClickAwayListener

Description

https://mui.com/material-ui/api/click-away-listener/

Usage

ClickAwayListener(...)

Arguments

...

Props to pass to the component.

Details

Value

Object with shiny.tag class suitable for use in the UI of a Shiny app.


Collapse

Description

https://mui.com/material-ui/api/collapse/

Usage

Collapse(...)

Arguments

...

Props to pass to the component.

Details

Value

Object with shiny.tag class suitable for use in the UI of a Shiny app.


Container

Description

https://mui.com/material-ui/api/container/

Usage

Container(...)

Arguments

...

Props to pass to the component.

Details

Value

Object with shiny.tag class suitable for use in the UI of a Shiny app.


CssBaseline

Description

https://mui.com/material-ui/api/css-baseline/

Usage

CssBaseline(...)

Arguments

...

Props to pass to the component.

Details

Value

Object with shiny.tag class suitable for use in the UI of a Shiny app.


Dialog

Description

https://mui.com/material-ui/api/dialog/

Usage

Dialog(...)

Dialog.shinyInput(inputId, ...)

updateDialog.shinyInput(
  session = shiny::getDefaultReactiveDomain(),
  inputId,
  ...
)

Arguments

...

Props to pass to the component.

inputId

ID of the component.

session

Object passed as the 'session' argument to Shiny server.

Details

Value

Object with shiny.tag class suitable for use in the UI of a Shiny app.

Note

This is an overlay surface wired as a click-reporter: input[[inputId]] holds a click count (incremented on every click inside the surface), and the wrapper does not manage the open state. Render it with open = TRUE/FALSE and toggle visibility from the server with updateDialog.shinyInput(session, inputId, open = TRUE). For the common "open on click of a button" pattern, Dialog.triggerId is simpler (open/close handled entirely client-side, no server logic).


Dialog.triggerId

Description

Custom Dialog bound to a DOM element by id. See 'js/src/MuiDialogTriggerId.jsx'. Open/close state is managed entirely client-side, so this works in Shiny apps, Quarto documents, and static HTML without server logic.

Usage

Dialog.triggerId(triggerId, ...)

Arguments

triggerId

HTML id of an existing DOM element that acts as the trigger to open the Dialog.

...

Named arguments forwarded as React props, plus children to render inside the component.

Value

Object with 'shiny.tag' class suitable for use in the UI of a Shiny app.

Examples


library(shiny)
library(muiMaterial)

ui <- muiMaterialPage(
  Button(id = "openDialog", "Open dialog"),
  Dialog.triggerId(
    "openDialog",
    DialogTitle("Hello"),
    DialogContent("Open/close managed entirely client-side.")
  )
)

shinyApp(ui, function(input, output, session) {})


DialogActions

Description

https://mui.com/material-ui/api/dialog-actions/

Usage

DialogActions(...)

Arguments

...

Props to pass to the component.

Details

Value

Object with shiny.tag class suitable for use in the UI of a Shiny app.


DialogContent

Description

https://mui.com/material-ui/api/dialog-content/

Usage

DialogContent(...)

Arguments

...

Props to pass to the component.

Details

Value

Object with shiny.tag class suitable for use in the UI of a Shiny app.


DialogContentText

Description

https://mui.com/material-ui/api/dialog-content-text/

Usage

DialogContentText(...)

Arguments

...

Props to pass to the component.

Details

Value

Object with shiny.tag class suitable for use in the UI of a Shiny app.


DialogTitle

Description

https://mui.com/material-ui/api/dialog-title/

Usage

DialogTitle(...)

Arguments

...

Props to pass to the component.

Details

Value

Object with shiny.tag class suitable for use in the UI of a Shiny app.


Divider

Description

https://mui.com/material-ui/api/divider/

Usage

Divider(...)

Arguments

...

Props to pass to the component.

Details

Value

Object with shiny.tag class suitable for use in the UI of a Shiny app.


Drawer

Description

https://mui.com/material-ui/api/drawer/

Usage

Drawer(...)

Drawer.shinyInput(inputId, ...)

updateDrawer.shinyInput(
  session = shiny::getDefaultReactiveDomain(),
  inputId,
  ...
)

Arguments

...

Props to pass to the component.

inputId

ID of the component.

session

Object passed as the 'session' argument to Shiny server.

Details

Value

Object with shiny.tag class suitable for use in the UI of a Shiny app.

Note

This is an overlay surface wired as a click-reporter: input[[inputId]] holds a click count, and the wrapper does not manage the open state. Render it with open = TRUE/FALSE and toggle visibility from the server with updateDrawer.shinyInput(session, inputId, open = TRUE). For the common "open on click of a button" pattern, Drawer.triggerId is simpler (open/close handled entirely client-side, no server logic).


Drawer.triggerId

Description

Custom Drawer bound to a DOM element by id. See 'js/src/MuiDrawerTriggerId.jsx'.

Usage

Drawer.triggerId(triggerId, ...)

Arguments

triggerId

HTML id of an existing DOM element that acts as the trigger (button, link, etc.) to open the Drawer.

...

Named arguments forwarded as React props, plus children to render inside the component. Pass closeOnLinkClick = FALSE to keep the Drawer open when any link inside it is clicked. The default (TRUE) closes the Drawer on any <a> click, including external links with target = "_blank".

Value

Object with 'shiny.tag' class suitable for use in the UI of a Shiny app.

Examples


library(shiny)
library(muiMaterial)

ui <- muiMaterialPage(
  Button(id = "openDrawer", "Open drawer"),
  Drawer.triggerId("openDrawer", anchor = "left", "Drawer content here")
)

shinyApp(ui, function(input, output, session) {})


Fab

Description

https://mui.com/material-ui/api/fab/

Usage

Fab(...)

Fab.shinyInput(inputId, ...)

updateFab.shinyInput(session = shiny::getDefaultReactiveDomain(), inputId, ...)

Arguments

...

Props to pass to the component.

inputId

ID of the component.

session

Object passed as the 'session' argument to Shiny server.

Details

Value

Object with shiny.tag class suitable for use in the UI of a Shiny app.


Fade

Description

https://mui.com/material-ui/api/fade/

Usage

Fade(...)

Arguments

...

Props to pass to the component.

Details

Value

Object with shiny.tag class suitable for use in the UI of a Shiny app.


FilledInput

Description

https://mui.com/material-ui/api/filled-input/

Usage

FilledInput(...)

FilledInput.shinyInput(inputId, ..., value = defaultValue)

updateFilledInput.shinyInput(
  session = shiny::getDefaultReactiveDomain(),
  inputId,
  ...
)

Arguments

...

Props to pass to the component.

inputId

ID of the component.

value

Starting value.

session

Object passed as the 'session' argument to Shiny server.

Details

Value

Object with shiny.tag class suitable for use in the UI of a Shiny app.


FormControl

Description

https://mui.com/material-ui/api/form-control/

Usage

FormControl(...)

Arguments

...

Props to pass to the component.

Details

Value

Object with shiny.tag class suitable for use in the UI of a Shiny app.


FormControlLabel

Description

https://mui.com/material-ui/api/form-control-label/

Usage

FormControlLabel(...)

FormControlLabel.shinyInput(inputId, ..., value = defaultValue)

updateFormControlLabel.shinyInput(
  session = shiny::getDefaultReactiveDomain(),
  inputId,
  ...
)

Arguments

...

Props to pass to the component.

inputId

ID of the component.

value

Starting value.

session

Object passed as the 'session' argument to Shiny server.

Details

Value

Object with shiny.tag class suitable for use in the UI of a Shiny app.


FormGroup

Description

https://mui.com/material-ui/api/form-group/

Usage

FormGroup(...)

Arguments

...

Props to pass to the component.

Details

Value

Object with shiny.tag class suitable for use in the UI of a Shiny app.


FormHelperText

Description

https://mui.com/material-ui/api/form-helper-text/

Usage

FormHelperText(...)

Arguments

...

Props to pass to the component.

Details

Value

Object with shiny.tag class suitable for use in the UI of a Shiny app.


FormLabel

Description

https://mui.com/material-ui/api/form-label/

Usage

FormLabel(...)

Arguments

...

Props to pass to the component.

Details

Value

Object with shiny.tag class suitable for use in the UI of a Shiny app.


GlobalStyles

Description

https://mui.com/material-ui/api/global-styles/

Usage

GlobalStyles(...)

Arguments

...

Props to pass to the component.

Details

Value

Object with shiny.tag class suitable for use in the UI of a Shiny app.


Grid

Description

https://mui.com/material-ui/api/grid/

Usage

Grid(...)

Arguments

...

Props to pass to the component.

Details

Value

Object with shiny.tag class suitable for use in the UI of a Shiny app.


Grow

Description

https://mui.com/material-ui/api/grow/

Usage

Grow(...)

Arguments

...

Props to pass to the component.

Details

Value

Object with shiny.tag class suitable for use in the UI of a Shiny app.


Icon

Description

https://mui.com/material-ui/api/icon/

Usage

Icon(...)

Arguments

...

Props to pass to the component.

Details

Value

Object with shiny.tag class suitable for use in the UI of a Shiny app.


IconButton

Description

https://mui.com/material-ui/api/icon-button/

Usage

IconButton(...)

IconButton.shinyInput(inputId, ...)

updateIconButton.shinyInput(
  session = shiny::getDefaultReactiveDomain(),
  inputId,
  ...
)

Arguments

...

Props to pass to the component.

inputId

ID of the component.

session

Object passed as the 'session' argument to Shiny server.

Details

Value

Object with shiny.tag class suitable for use in the UI of a Shiny app.


ImageList

Description

https://mui.com/material-ui/api/image-list/

Usage

ImageList(...)

Arguments

...

Props to pass to the component.

Details

Value

Object with shiny.tag class suitable for use in the UI of a Shiny app.


ImageListItem

Description

https://mui.com/material-ui/api/image-list-item/

Usage

ImageListItem(...)

Arguments

...

Props to pass to the component.

Details

Value

Object with shiny.tag class suitable for use in the UI of a Shiny app.


ImageListItemBar

Description

https://mui.com/material-ui/api/image-list-item-bar/

Usage

ImageListItemBar(...)

Arguments

...

Props to pass to the component.

Details

Value

Object with shiny.tag class suitable for use in the UI of a Shiny app.


Input

Description

https://mui.com/material-ui/api/input/

Usage

Input(...)

Input.shinyInput(inputId, ..., value = defaultValue)

updateInput.shinyInput(
  session = shiny::getDefaultReactiveDomain(),
  inputId,
  ...
)

Arguments

...

Props to pass to the component.

inputId

ID of the component.

value

Starting value.

session

Object passed as the 'session' argument to Shiny server.

Details

Value

Object with shiny.tag class suitable for use in the UI of a Shiny app.


InputAdornment

Description

https://mui.com/material-ui/api/input-adornment/

Usage

InputAdornment(...)

Arguments

...

Props to pass to the component.

Details

Value

Object with shiny.tag class suitable for use in the UI of a Shiny app.


InputBase

Description

https://mui.com/material-ui/api/input-base/

Usage

InputBase(...)

Arguments

...

Props to pass to the component.

Details

Value

Object with shiny.tag class suitable for use in the UI of a Shiny app.


InputLabel

Description

https://mui.com/material-ui/api/input-label/

Usage

InputLabel(...)

Arguments

...

Props to pass to the component.

Details

Value

Object with shiny.tag class suitable for use in the UI of a Shiny app.


LinearProgress

Description

https://mui.com/material-ui/api/linear-progress/

Usage

LinearProgress(...)

Arguments

...

Props to pass to the component.

Details

Value

Object with shiny.tag class suitable for use in the UI of a Shiny app.


Description

https://mui.com/material-ui/api/link/

Usage

Link(...)

Arguments

...

Props to pass to the component.

Details

Value

Object with shiny.tag class suitable for use in the UI of a Shiny app.


List

Description

https://mui.com/material-ui/api/list/

Usage

List(...)

Arguments

...

Props to pass to the component.

Details

Value

Object with shiny.tag class suitable for use in the UI of a Shiny app.


ListItem

Description

https://mui.com/material-ui/api/list-item/

Usage

ListItem(...)

Arguments

...

Props to pass to the component.

Details

Value

Object with shiny.tag class suitable for use in the UI of a Shiny app.


ListItemAvatar

Description

https://mui.com/material-ui/api/list-item-avatar/

Usage

ListItemAvatar(...)

Arguments

...

Props to pass to the component.

Details

Value

Object with shiny.tag class suitable for use in the UI of a Shiny app.


ListItemButton

Description

https://mui.com/material-ui/api/list-item-button/

Usage

ListItemButton(...)

Arguments

...

Props to pass to the component.

Details

Value

Object with shiny.tag class suitable for use in the UI of a Shiny app.


ListItemIcon

Description

https://mui.com/material-ui/api/list-item-icon/

Usage

ListItemIcon(...)

Arguments

...

Props to pass to the component.

Details

Value

Object with shiny.tag class suitable for use in the UI of a Shiny app.


ListItemSecondaryAction

Description

https://mui.com/material-ui/api/list-item-secondary-action/

Usage

ListItemSecondaryAction(...)

Arguments

...

Props to pass to the component.

Details

Value

Object with shiny.tag class suitable for use in the UI of a Shiny app.


ListItemText

Description

https://mui.com/material-ui/api/list-item-text/

Usage

ListItemText(...)

Arguments

...

Props to pass to the component.

Details

Value

Object with shiny.tag class suitable for use in the UI of a Shiny app.


ListSubheader

Description

https://mui.com/material-ui/api/list-subheader/

Usage

ListSubheader(...)

Arguments

...

Props to pass to the component.

Details

Value

Object with shiny.tag class suitable for use in the UI of a Shiny app.


LoadingButton

Description

https://mui.com/material-ui/react-button/

Usage

LoadingButton(...)

LoadingButton.shinyInput(inputId, ...)

updateLoadingButton.shinyInput(
  session = shiny::getDefaultReactiveDomain(),
  inputId,
  ...
)

Arguments

...

Props to pass to the component.

inputId

ID of the component.

session

Object passed as the 'session' argument to Shiny server.

Value

Object with shiny.tag class suitable for use in the UI of a Shiny app.

Note

LoadingButton is part of @mui/lab, which is published on the MUI beta channel. Lab APIs may change in future minor releases.


Masonry

Description

https://mui.com/material-ui/api/masonry/

Usage

Masonry(...)

Arguments

...

Props to pass to the component.

Details

Value

Object with shiny.tag class suitable for use in the UI of a Shiny app.


Description

https://mui.com/material-ui/api/menu/

Usage

Menu(...)

Menu.shinyInput(inputId, ...)

updateMenu.shinyInput(
  session = shiny::getDefaultReactiveDomain(),
  inputId,
  ...
)

Arguments

...

Props to pass to the component.

inputId

ID of the component.

session

Object passed as the 'session' argument to Shiny server.

Details

Value

Object with shiny.tag class suitable for use in the UI of a Shiny app.

Note

This is an overlay surface wired as a click-reporter: input[[inputId]] holds a click count (it does not tell you which MenuItem was clicked), and the wrapper does not manage the open state. Render it with open = TRUE/FALSE and toggle visibility from the server with updateMenu.shinyInput(session, inputId, open = TRUE). For the common "open on click of a button" pattern, Menu.triggerId is simpler (open/close handled entirely client-side, no server logic).


Description

Custom Menu bound to a DOM element by id. See 'js/src/MuiMenuTriggerId.jsx'.

Usage

Menu.triggerId(triggerId, ...)

Arguments

triggerId

HTML id of an existing DOM element that acts as the trigger (button, link, etc.) to open the Menu.

...

Named arguments forwarded as React props, plus children to render inside the component. Pass 'closeOnItemClick = FALSE' to keep the menu open after a click.

Details

Pass 'closeOnItemClick = FALSE' to disable auto-close on click (useful when the menu contains interactive children like checkboxes).

Value

Object with 'shiny.tag' class suitable for use in the UI of a Shiny app.


Description

https://mui.com/material-ui/api/menu-item/

Usage

MenuItem(...)

MenuItem.shinyInput(inputId, ...)

updateMenuItem.shinyInput(
  session = shiny::getDefaultReactiveDomain(),
  inputId,
  ...
)

Arguments

...

Props to pass to the component.

inputId

ID of the component.

session

Object passed as the 'session' argument to Shiny server.

Details

Value

Object with shiny.tag class suitable for use in the UI of a Shiny app.


Description

https://mui.com/material-ui/api/menu-list/

Usage

MenuList(...)

Arguments

...

Props to pass to the component.

Details

Value

Object with shiny.tag class suitable for use in the UI of a Shiny app.


MobileStepper

Description

https://mui.com/material-ui/api/mobile-stepper/

Usage

MobileStepper(...)

Arguments

...

Props to pass to the component.

Details

Value

Object with shiny.tag class suitable for use in the UI of a Shiny app.


Description

https://mui.com/material-ui/api/modal/

Usage

Modal(...)

Modal.shinyInput(inputId, ...)

updateModal.shinyInput(
  session = shiny::getDefaultReactiveDomain(),
  inputId,
  ...
)

Arguments

...

Props to pass to the component.

inputId

ID of the component.

session

Object passed as the 'session' argument to Shiny server.

Details

Value

Object with shiny.tag class suitable for use in the UI of a Shiny app.

Note

This is an overlay surface wired as a click-reporter: input[[inputId]] holds a click count, and the wrapper does not manage the open state. Render it with open = TRUE/FALSE and toggle visibility from the server with updateModal.shinyInput(session, inputId, open = TRUE). For the common "open on click of a button" pattern, Modal.triggerId is simpler (open/close handled entirely client-side, no server logic).


Modal.triggerId

Description

Custom Modal bound to a DOM element by id. See 'js/src/MuiModalTriggerId.jsx'. Open/close state is managed entirely client-side.

Usage

Modal.triggerId(triggerId, ...)

Arguments

triggerId

HTML id of an existing DOM element that acts as the trigger to open the Modal.

...

Named arguments forwarded as React props, plus children to render inside the component.

Value

Object with 'shiny.tag' class suitable for use in the UI of a Shiny app.


NativeSelect

Description

https://mui.com/material-ui/api/native-select/

Usage

NativeSelect(...)

NativeSelect.shinyInput(inputId, ..., value = defaultValue)

updateNativeSelect.shinyInput(
  session = shiny::getDefaultReactiveDomain(),
  inputId,
  ...
)

Arguments

...

Props to pass to the component.

inputId

ID of the component.

value

Starting value.

session

Object passed as the 'session' argument to Shiny server.

Details

Value

Object with shiny.tag class suitable for use in the UI of a Shiny app.


NoSsr

Description

https://mui.com/material-ui/api/no-ssr/

Usage

NoSsr(...)

Arguments

...

Props to pass to the component.

Details

Value

Object with shiny.tag class suitable for use in the UI of a Shiny app.


OutlinedInput

Description

https://mui.com/material-ui/api/outlined-input/

Usage

OutlinedInput(...)

OutlinedInput.shinyInput(inputId, ..., value = defaultValue)

updateOutlinedInput.shinyInput(
  session = shiny::getDefaultReactiveDomain(),
  inputId,
  ...
)

Arguments

...

Props to pass to the component.

inputId

ID of the component.

value

Starting value.

session

Object passed as the 'session' argument to Shiny server.

Details

Value

Object with shiny.tag class suitable for use in the UI of a Shiny app.


Pagination

Description

https://mui.com/material-ui/api/pagination/

Usage

Pagination(...)

Pagination.shinyInput(inputId, ..., value = defaultValue)

updatePagination.shinyInput(
  session = shiny::getDefaultReactiveDomain(),
  inputId,
  ...
)

Arguments

...

Props to pass to the component.

inputId

ID of the component.

value

Starting value.

session

Object passed as the 'session' argument to Shiny server.

Details

Value

Object with shiny.tag class suitable for use in the UI of a Shiny app.


PaginationItem

Description

https://mui.com/material-ui/api/pagination-item/

Usage

PaginationItem(...)

Arguments

...

Props to pass to the component.

Details

Value

Object with shiny.tag class suitable for use in the UI of a Shiny app.


Paper

Description

https://mui.com/material-ui/api/paper/

Usage

Paper(...)

Arguments

...

Props to pass to the component.

Details

Value

Object with shiny.tag class suitable for use in the UI of a Shiny app.


Popover

Description

https://mui.com/material-ui/api/popover/

Usage

Popover(...)

Arguments

...

Props to pass to the component.

Details

Value

Object with shiny.tag class suitable for use in the UI of a Shiny app.


Popover.triggerId

Description

Custom Popover bound to a DOM element by id. See 'js/src/MuiPopoverTriggerId.jsx'. The trigger element acts as the anchor; the Popover opens on click and closes on clickaway.

Usage

Popover.triggerId(triggerId, ...)

Arguments

triggerId

HTML id of an existing DOM element that acts as the anchor/trigger for the Popover.

...

Named arguments forwarded as React props, plus children to render inside the component.

Value

Object with 'shiny.tag' class suitable for use in the UI of a Shiny app.


Popper

Description

https://mui.com/material-ui/api/popper/

Usage

Popper(...)

Arguments

...

Props to pass to the component.

Details

Value

Object with shiny.tag class suitable for use in the UI of a Shiny app.


Portal

Description

https://mui.com/material-ui/api/portal/

Usage

Portal(...)

Arguments

...

Props to pass to the component.

Details

Value

Object with shiny.tag class suitable for use in the UI of a Shiny app.


Radio

Description

https://mui.com/material-ui/api/radio/

Usage

Radio(...)

Radio.shinyInput(inputId, ..., value = defaultValue)

updateRadio.shinyInput(
  session = shiny::getDefaultReactiveDomain(),
  inputId,
  ...
)

Arguments

...

Props to pass to the component.

inputId

ID of the component.

value

Starting value.

session

Object passed as the 'session' argument to Shiny server.

Details

Value

Object with shiny.tag class suitable for use in the UI of a Shiny app.

Note

A standalone Radio.shinyInput reports a boolean (checked) to the server, not the selected option string. For mutually-exclusive option groups use RadioGroup.shinyInput instead, which reports the string value of the selected radio.

See Also

RadioGroup.shinyInput


RadioGroup

Description

https://mui.com/material-ui/api/radio-group/

Usage

RadioGroup(...)

RadioGroup.shinyInput(inputId, ..., value = defaultValue)

updateRadioGroup.shinyInput(
  session = shiny::getDefaultReactiveDomain(),
  inputId,
  ...
)

Arguments

...

Props to pass to the component.

inputId

ID of the component.

value

Starting value.

session

Object passed as the 'session' argument to Shiny server.

Details

Value

Object with shiny.tag class suitable for use in the UI of a Shiny app.


Rating

Description

https://mui.com/material-ui/api/rating/

Usage

Rating(...)

Rating.shinyInput(inputId, ..., value = defaultValue)

updateRating.shinyInput(
  session = shiny::getDefaultReactiveDomain(),
  inputId,
  ...
)

Arguments

...

Props to pass to the component.

inputId

ID of the component.

value

Starting value.

session

Object passed as the 'session' argument to Shiny server.

Details

Value

Object with shiny.tag class suitable for use in the UI of a Shiny app.


ScopedCssBaseline

Description

https://mui.com/material-ui/api/scoped-css-baseline/

Usage

ScopedCssBaseline(...)

Arguments

...

Props to pass to the component.

Details

Value

Object with shiny.tag class suitable for use in the UI of a Shiny app.


Select

Description

https://mui.com/material-ui/api/select/

Usage

Select(...)

Select.shinyInput(inputId, ..., value = defaultValue)

updateSelect.shinyInput(
  session = shiny::getDefaultReactiveDomain(),
  inputId,
  ...
)

Arguments

...

Props to pass to the component.

inputId

ID of the component.

value

Starting value.

session

Object passed as the 'session' argument to Shiny server.

Details

Value

Object with shiny.tag class suitable for use in the UI of a Shiny app.


Skeleton

Description

https://mui.com/material-ui/api/skeleton/

Usage

Skeleton(...)

Arguments

...

Props to pass to the component.

Details

Value

Object with shiny.tag class suitable for use in the UI of a Shiny app.


Slide

Description

https://mui.com/material-ui/api/slide/

Usage

Slide(...)

Arguments

...

Props to pass to the component.

Details

Value

Object with shiny.tag class suitable for use in the UI of a Shiny app.


Slider

Description

https://mui.com/material-ui/api/slider/

Usage

Slider(...)

Slider.shinyInput(inputId, ..., value = defaultValue)

updateSlider.shinyInput(
  session = shiny::getDefaultReactiveDomain(),
  inputId,
  ...
)

Arguments

...

Props to pass to the component.

inputId

ID of the component.

value

Starting value.

session

Object passed as the 'session' argument to Shiny server.

Details

Value

Object with shiny.tag class suitable for use in the UI of a Shiny app.

Examples


library(shiny)
library(muiMaterial)

ui <- muiMaterialPage(
  Slider.shinyInput("s", value = 30, min = 0, max = 100),
  verbatimTextOutput("out")
)

server <- function(input, output, session) {
  output$out <- renderPrint(input$s)
}

shinyApp(ui, server)


Snackbar

Description

https://mui.com/material-ui/api/snackbar/

Usage

Snackbar(...)

Snackbar.shinyInput(inputId, ...)

updateSnackbar.shinyInput(
  session = shiny::getDefaultReactiveDomain(),
  inputId,
  ...
)

Arguments

...

Props to pass to the component.

inputId

ID of the component.

session

Object passed as the 'session' argument to Shiny server.

Details

Value

Object with shiny.tag class suitable for use in the UI of a Shiny app.

Note

This is an overlay surface wired as a click-reporter: input[[inputId]] holds a click count, and the wrapper does not manage the open state. Render it with open = TRUE/FALSE and toggle visibility from the server with updateSnackbar.shinyInput(session, inputId, open = TRUE) (e.g. open it in response to another event, then close it from the Snackbar's autoHideDuration/onClose).


SnackbarContent

Description

https://mui.com/material-ui/api/snackbar-content/

Usage

SnackbarContent(...)

Arguments

...

Props to pass to the component.

Details

Value

Object with shiny.tag class suitable for use in the UI of a Shiny app.


SpeedDial

Description

https://mui.com/material-ui/api/speed-dial/

Usage

SpeedDial(...)

Arguments

...

Props to pass to the component.

Details

Value

Object with shiny.tag class suitable for use in the UI of a Shiny app.


SpeedDialAction

Description

https://mui.com/material-ui/api/speed-dial-action/

Usage

SpeedDialAction(...)

Arguments

...

Props to pass to the component.

Details

Value

Object with shiny.tag class suitable for use in the UI of a Shiny app.


SpeedDialIcon

Description

https://mui.com/material-ui/api/speed-dial-icon/

Usage

SpeedDialIcon(...)

Arguments

...

Props to pass to the component.

Details

Value

Object with shiny.tag class suitable for use in the UI of a Shiny app.


Stack

Description

https://mui.com/material-ui/api/stack/

Usage

Stack(...)

Arguments

...

Props to pass to the component.

Details

Value

Object with shiny.tag class suitable for use in the UI of a Shiny app.


Step

Description

https://mui.com/material-ui/api/step/

Usage

Step(...)

Arguments

...

Props to pass to the component.

Details

Value

Object with shiny.tag class suitable for use in the UI of a Shiny app.


StepButton

Description

https://mui.com/material-ui/api/step-button/

Usage

StepButton(...)

StepButton.shinyInput(inputId, ...)

updateStepButton.shinyInput(
  session = shiny::getDefaultReactiveDomain(),
  inputId,
  ...
)

Arguments

...

Props to pass to the component.

inputId

ID of the component.

session

Object passed as the 'session' argument to Shiny server.

Details

Value

Object with shiny.tag class suitable for use in the UI of a Shiny app.


StepConnector

Description

https://mui.com/material-ui/api/step-connector/

Usage

StepConnector(...)

Arguments

...

Props to pass to the component.

Details

Value

Object with shiny.tag class suitable for use in the UI of a Shiny app.


StepContent

Description

https://mui.com/material-ui/api/step-content/

Usage

StepContent(...)

Arguments

...

Props to pass to the component.

Details

Value

Object with shiny.tag class suitable for use in the UI of a Shiny app.


StepIcon

Description

https://mui.com/material-ui/api/step-icon/

Usage

StepIcon(...)

Arguments

...

Props to pass to the component.

Details

Value

Object with shiny.tag class suitable for use in the UI of a Shiny app.


StepLabel

Description

https://mui.com/material-ui/api/step-label/

Usage

StepLabel(...)

Arguments

...

Props to pass to the component.

Details

Value

Object with shiny.tag class suitable for use in the UI of a Shiny app.


Stepper

Description

https://mui.com/material-ui/api/stepper/

Usage

Stepper(...)

Arguments

...

Props to pass to the component.

Details

Value

Object with shiny.tag class suitable for use in the UI of a Shiny app.


SvgIcon

Description

https://mui.com/material-ui/api/svg-icon/

Usage

SvgIcon(...)

Arguments

...

Props to pass to the component.

Details

Value

Object with shiny.tag class suitable for use in the UI of a Shiny app.


SwipeableDrawer

Description

https://mui.com/material-ui/api/swipeable-drawer/

Usage

SwipeableDrawer(...)

Arguments

...

Props to pass to the component.

Details

Value

Object with shiny.tag class suitable for use in the UI of a Shiny app.


SwipeableDrawer.triggerId

Description

Custom SwipeableDrawer bound to a DOM element by id. See 'js/src/MuiSwipeableDrawerTriggerId.jsx'.

Usage

SwipeableDrawer.triggerId(triggerId, ...)

Arguments

triggerId

HTML id of an existing DOM element that acts as the trigger (button, link, etc.) to open the Drawer.

...

Named arguments forwarded as React props, plus children to render inside the component. Pass closeOnLinkClick = FALSE to keep the Drawer open when any link inside it is clicked. The default (TRUE) closes the Drawer on any <a> click, including external links with target = "_blank".

Value

Object with 'shiny.tag' class suitable for use in the UI of a Shiny app.


Switch

Description

https://mui.com/material-ui/api/switch/

Usage

Switch(...)

Switch.shinyInput(inputId, ..., value = defaultValue)

updateSwitch.shinyInput(
  session = shiny::getDefaultReactiveDomain(),
  inputId,
  ...
)

Arguments

...

Props to pass to the component.

inputId

ID of the component.

value

Starting value.

session

Object passed as the 'session' argument to Shiny server.

Details

Value

Object with shiny.tag class suitable for use in the UI of a Shiny app.


Tab

Description

https://mui.com/material-ui/api/tab/

Usage

Tab(...)

Arguments

...

Props to pass to the component.

Details

Value

Object with shiny.tag class suitable for use in the UI of a Shiny app.


TabContext

Description

https://mui.com/material-ui/api/tab-context/

Usage

TabContext(...)

TabContext.shinyInput(inputId, ..., value = defaultValue)

updateTabContext.shinyInput(
  session = shiny::getDefaultReactiveDomain(),
  inputId,
  ...
)

TabContext.static(..., value = NULL, defaultValue = NULL)

Arguments

...

Child elements (typically a Box wrapping TabList.static and TabPanel components). value and defaultValue are accepted by name only – putting ... first guarantees that an unnamed child element is never matched positionally into value / defaultValue.

inputId

ID of the component.

value

Controlled selected tab value. When supplied, the caller is the source of truth: the value is honored on every render and the wrapper never mutates it. Combine with an onChange (on TabList.static or on TabContext.static) that writes the new value back to wherever it lives. The tidiest binding needs no JavaScript: make the tab a URL path segment, link each Tab with href (e.g. "#/overview"), and read it back with reactRouter::useParams(as = "value", selector = "tab"). Use useParams (a scalar), not useSearchParams, which returns getAll(), an array that never matches a TabPanel's string value. Other sources (a parent's state, a Shiny input) work too. Use either value or defaultValue, not both; the mode is fixed at the first render.

session

Object passed as the 'session' argument to Shiny server.

defaultValue

Uncontrolled initial selected tab value. The wrapper owns the active-tab state and updates it on user clicks. This is the right choice for Quarto documents and static HTML, where no external state is involved.

Details

Value

Object with shiny.tag class suitable for use in the UI of a Shiny app.

Note

TabContext is part of @mui/lab, which is published on the MUI beta channel. Lab APIs may change in future minor releases.

Pass an initial value matching one of the TabPanel values to pre-select that panel; when omitted, the component mounts with no panel selected (value = "") rather than uncontrolled, so a later server-driven update does not trigger MUI's controlled/uncontrolled warning. TabContext itself has no change event, so input[[inputId]] reports only this initial value. To react to tab clicks on the server, read input[[inputId]] from the TabList.shinyInput instead.


TabList

Description

https://mui.com/material-ui/api/tab-list/

Usage

TabList(...)

TabList.shinyInput(inputId, ..., value = defaultValue)

updateTabList.shinyInput(
  session = shiny::getDefaultReactiveDomain(),
  inputId,
  ...
)

TabList.static(...)

Arguments

...

Child Tab elements and other props.

inputId

ID of the component.

value

Starting value.

session

Object passed as the 'session' argument to Shiny server.

Details

Value

Object with shiny.tag class suitable for use in the UI of a Shiny app.

Note

TabList is part of @mui/lab, which is published on the MUI beta channel. Lab APIs may change in future minor releases.


TabPanel

Description

'TabPanel.static()' is an alias for 'TabPanel()', kept for backward compatibility.

https://mui.com/material-ui/api/tab-panel/

Usage

TabPanel(...)

TabPanel.static(...)

TabPanel.shinyInput(inputId, ..., value = defaultValue)

updateTabPanel.shinyInput(
  session = shiny::getDefaultReactiveDomain(),
  inputId,
  ...
)

Arguments

...

Props to pass to the component.

inputId

ID of the component.

value

Starting value.

session

Object passed as the 'session' argument to Shiny server.

Details

Value

Object with shiny.tag class suitable for use in the UI of a Shiny app.

Note

TabPanel is part of @mui/lab, which is published on the MUI beta channel. Lab APIs may change in future minor releases.

TabPanel is a display-only component: it shows or hides its content based on the active tab value held by the surrounding TabContext, but never fires onChange from user interaction. As a result input$<inputId> will always remain NULL. To react to tab changes on the server, read input$<inputId> from the TabList.shinyInput instead.


TabScrollButton

Description

https://mui.com/material-ui/api/tab-scroll-button/

Usage

TabScrollButton(...)

Arguments

...

Props to pass to the component.

Details

Value

Object with shiny.tag class suitable for use in the UI of a Shiny app.


Table

Description

https://mui.com/material-ui/api/table/

Usage

Table(...)

Arguments

...

Props to pass to the component.

Details

Value

Object with shiny.tag class suitable for use in the UI of a Shiny app.


TableBody

Description

https://mui.com/material-ui/api/table-body/

Usage

TableBody(...)

Arguments

...

Props to pass to the component.

Details

Value

Object with shiny.tag class suitable for use in the UI of a Shiny app.


TableCell

Description

https://mui.com/material-ui/api/table-cell/

Usage

TableCell(...)

Arguments

...

Props to pass to the component.

Details

Value

Object with shiny.tag class suitable for use in the UI of a Shiny app.


TableContainer

Description

https://mui.com/material-ui/api/table-container/

Usage

TableContainer(...)

Arguments

...

Props to pass to the component.

Details

Value

Object with shiny.tag class suitable for use in the UI of a Shiny app.


TableFooter

Description

https://mui.com/material-ui/api/table-footer/

Usage

TableFooter(...)

Arguments

...

Props to pass to the component.

Details

Value

Object with shiny.tag class suitable for use in the UI of a Shiny app.


TableHead

Description

https://mui.com/material-ui/api/table-head/

Usage

TableHead(...)

Arguments

...

Props to pass to the component.

Details

Value

Object with shiny.tag class suitable for use in the UI of a Shiny app.


TablePagination

Description

https://mui.com/material-ui/api/table-pagination/

Usage

TablePagination(...)

Arguments

...

Props to pass to the component.

Details

Value

Object with shiny.tag class suitable for use in the UI of a Shiny app.


TableRow

Description

https://mui.com/material-ui/api/table-row/

Usage

TableRow(...)

Arguments

...

Props to pass to the component.

Details

Value

Object with shiny.tag class suitable for use in the UI of a Shiny app.


TableSortLabel

Description

https://mui.com/material-ui/api/table-sort-label/

Usage

TableSortLabel(...)

Arguments

...

Props to pass to the component.

Details

Value

Object with shiny.tag class suitable for use in the UI of a Shiny app.


Tabs

Description

https://mui.com/material-ui/api/tabs/

Usage

Tabs(...)

Tabs.shinyInput(inputId, ..., value = defaultValue)

updateTabs.shinyInput(
  session = shiny::getDefaultReactiveDomain(),
  inputId,
  ...
)

Arguments

...

Props to pass to the component.

inputId

ID of the component.

value

Starting value.

session

Object passed as the 'session' argument to Shiny server.

Details

Value

Object with shiny.tag class suitable for use in the UI of a Shiny app.

Note

Pass an initial value matching one of the child Tab values to pre-select that tab. When omitted, the component mounts with no tab selected (value = FALSE) rather than uncontrolled, so a later server-driven update does not trigger MUI's controlled/uncontrolled warning.


TextField

Description

https://mui.com/material-ui/api/text-field/

Usage

TextField(...)

TextField.shinyInput(inputId, ..., value = defaultValue)

updateTextField.shinyInput(
  session = shiny::getDefaultReactiveDomain(),
  inputId,
  ...
)

Arguments

...

Props to pass to the component.

inputId

ID of the component.

value

Starting value.

session

Object passed as the 'session' argument to Shiny server.

Details

Value

Object with shiny.tag class suitable for use in the UI of a Shiny app.

Examples


library(shiny)
library(muiMaterial)

ui <- muiMaterialPage(
  TextField.shinyInput("txt", label = "Your name", value = ""),
  verbatimTextOutput("out")
)

server <- function(input, output, session) {
  output$out <- renderPrint(input$txt)
}

shinyApp(ui, server)


TextareaAutosize

Description

https://mui.com/material-ui/api/textarea-autosize/

Usage

TextareaAutosize(...)

Arguments

...

Props to pass to the component.

Details

Value

Object with shiny.tag class suitable for use in the UI of a Shiny app.


ThemeProvider

Description

Custom ThemeProvider built on top of MUI's 'ThemeProvider'. See 'js/src/ThemeProvider.jsx'. Pass a 'theme' list (as you would pass a JS object to MUI's 'createTheme()') plus any children to render under that theme. See <https://mui.com/material-ui/customization/theming/> for the upstream documentation.

Usage

ThemeProvider(...)

Arguments

...

Named arguments forwarded as React props (notably 'theme', a list mirroring MUI's 'createTheme()' options), plus the children to render under the theme.

Value

Object with 'shiny.tag' class suitable for use in the UI of a Shiny app.

Examples


library(shiny)
library(muiMaterial)

theme <- list(palette = list(mode = "dark", primary = list(main = "#90caf9")))

ui <- muiMaterialPage(
  ThemeProvider(
    theme = theme,
    CssBaseline(),
    Button("Themed button", variant = "contained")
  )
)

shinyApp(ui, function(input, output, session) {})


Timeline

Description

https://mui.com/material-ui/api/timeline/

Usage

Timeline(...)

Arguments

...

Props to pass to the component.

Details

Value

Object with shiny.tag class suitable for use in the UI of a Shiny app.

Note

Timeline and its sub-components (TimelineItem, TimelineDot, etc.) are part of @mui/lab, which is published on the MUI beta channel. Lab APIs may change in future minor releases.


TimelineConnector

Description

https://mui.com/material-ui/api/timeline-connector/

Usage

TimelineConnector(...)

Arguments

...

Props to pass to the component.

Details

Value

Object with shiny.tag class suitable for use in the UI of a Shiny app.


TimelineContent

Description

https://mui.com/material-ui/api/timeline-content/

Usage

TimelineContent(...)

Arguments

...

Props to pass to the component.

Details

Value

Object with shiny.tag class suitable for use in the UI of a Shiny app.


TimelineDot

Description

https://mui.com/material-ui/api/timeline-dot/

Usage

TimelineDot(...)

Arguments

...

Props to pass to the component.

Details

Value

Object with shiny.tag class suitable for use in the UI of a Shiny app.


TimelineItem

Description

https://mui.com/material-ui/api/timeline-item/

Usage

TimelineItem(...)

Arguments

...

Props to pass to the component.

Details

Value

Object with shiny.tag class suitable for use in the UI of a Shiny app.


TimelineOppositeContent

Description

https://mui.com/material-ui/api/timeline-opposite-content/

Usage

TimelineOppositeContent(...)

Arguments

...

Props to pass to the component.

Details

Value

Object with shiny.tag class suitable for use in the UI of a Shiny app.


TimelineSeparator

Description

https://mui.com/material-ui/api/timeline-separator/

Usage

TimelineSeparator(...)

Arguments

...

Props to pass to the component.

Details

Value

Object with shiny.tag class suitable for use in the UI of a Shiny app.


ToggleButton

Description

https://mui.com/material-ui/api/toggle-button/

Usage

ToggleButton(...)

ToggleButton.shinyInput(inputId, ...)

updateToggleButton.shinyInput(
  session = shiny::getDefaultReactiveDomain(),
  inputId,
  ...
)

Arguments

...

Props to pass to the component.

inputId

ID of the component.

session

Object passed as the 'session' argument to Shiny server.

Details

Value

Object with shiny.tag class suitable for use in the UI of a Shiny app.


ToggleButtonGroup

Description

https://mui.com/material-ui/api/toggle-button-group/

Usage

ToggleButtonGroup(...)

ToggleButtonGroup.shinyInput(inputId, ..., value = defaultValue)

updateToggleButtonGroup.shinyInput(
  session = shiny::getDefaultReactiveDomain(),
  inputId,
  ...
)

Arguments

...

Props to pass to the component.

inputId

ID of the component.

value

Starting value.

session

Object passed as the 'session' argument to Shiny server.

Details

Value

Object with shiny.tag class suitable for use in the UI of a Shiny app.


Toolbar

Description

https://mui.com/material-ui/api/toolbar/

Usage

Toolbar(...)

Arguments

...

Props to pass to the component.

Details

Value

Object with shiny.tag class suitable for use in the UI of a Shiny app.


Tooltip

Description

https://mui.com/material-ui/api/tooltip/

Usage

Tooltip(...)

Arguments

...

Props to pass to the component.

Details

Value

Object with shiny.tag class suitable for use in the UI of a Shiny app.


Typography

Description

https://mui.com/material-ui/api/typography/

Usage

Typography(...)

Arguments

...

Props to pass to the component.

Details

Value

Object with shiny.tag class suitable for use in the UI of a Shiny app.


Zoom

Description

https://mui.com/material-ui/api/zoom/

Usage

Zoom(...)

Arguments

...

Props to pass to the component.

Details

Value

Object with shiny.tag class suitable for use in the UI of a Shiny app.


Documentation template for remaining components

Description

Documentation template for remaining components

Arguments

...

Props to pass to the component. The allowed props are listed below in the Details section.

Value

Object with 'shiny.tag' class suitable for use in the UI of a Shiny app.


muiMaterial JS dependency

Description

muiMaterial JS dependency

Usage

muiMaterialDependency()

Value

HTML dependency object.


Run muiMaterial example

Description

Launch a Shiny example app or list the available examples. Use 'muiMaterial::muiMaterialExample("showcase")' to run a showcase app with all the components.

Usage

muiMaterialExample(example = NULL, ...)

Arguments

example

The name of the example to run, or 'NULL' to retrieve the list of examples.

...

Additional arguments to pass to 'shiny::runApp()'.

Details

This function is adapted from 'runExample()' in the shiny.blueprint package.

Value

When 'example' is 'NULL', a character vector of the available example names. Otherwise the function launches a Shiny app and does not return; interrupt R to stop it (usually by pressing Ctrl+C or Esc).


HTML body without Bootstrap and margins

Description

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 style in body, using 'margin:0' by default.

debugReact

Whether to enable react debug mode. FALSE by default.

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>.

Value

html object with 'margin:0' which can be passed as the UI of a Shiny app.

Examples


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) {})


Print muiMaterial components

Description

When called interactively, renders the component in the IDE viewer panel. Otherwise, falls back to standard shiny.tag printing (raw HTML text).

Usage

## S3 method for class 'muiMaterial'
print(x, browse = interactive(), ...)

Arguments

x

A muiMaterial object (also inherits shiny.tag).

browse

Whether to render in viewer. Defaults to TRUE in interactive sessions.

...

Additional arguments passed to print.

Value

Invisibly returns x.


Objects exported from other packages

Description

These objects are imported from other packages. Follow the links below to see their documentation.

shiny.react

JS, reactOutput, renderReact, setInput, triggerEvent


Documentation template for components with '.shinyInput' wrappers

Description

Documentation template for components with '.shinyInput' wrappers

Arguments

inputId

ID of the component.

value

Starting value.

session

Object passed as the 'session' argument to Shiny server.

...

Props to pass to the component. The allowed props are listed below in the Details section.

Value

Object with 'shiny.tag' class suitable for use in the UI of a Shiny app. The update functions return nothing (called for side effects).

Reserved props

‘.shinyInput' wrappers own the component’s 'value' (or 'checked'/'page') and 'onChange' props – that binding is how the value reaches 'input[[inputId]]'. Do not pass your own 'value'/'onChange' through '...': a caller-supplied prop overrides the wrapper's and silently breaks input reporting. Set the starting value with the 'value' argument and react to changes server-side via 'input[[inputId]]' (or push new values with the matching 'update*' function).