muiMaterial (development version)
New features
- new
ListItemButton.shinyInput()/updateListItemButton.shinyInput(): clickable list rows now report a click counter toinput[[inputId]], likeButton.shinyInput(). (The JS adapter existed but was not exposed in R.) -
.shinyInput()functions now warn when a reserved prop is supplied (checked/onChangeon value inputs,onClickon action inputs): a caller-supplied reserved prop silently overrides the input wiring andinput[[inputId]]stops updating. Deliberate overrides (an advanced pattern) can silence the warning withoptions(muiMaterial.warnReservedProps = FALSE).
Breaking changes
-
Drawer.triggerId()andSwipeableDrawer.triggerId(): thesxprop now styles the Drawer root, consistent with every other component (it was previously merged into the drawer paper). Size the paper with thewidthargument or style it viaslotProps = list(paper = list(sx = ...)). Root-level patterns such as responsivedisplayand"& .MuiDrawer-paper"selectors now work as they do in the MUI docs.
Improvements
-
.triggerIdwrappers now bind their trigger with a delegated document-level listener. Triggers rendered or replaced later by Shiny (renderUI()/uiOutput()) keep working; previously the binding was lost when the trigger element was re-rendered. - the delegated trigger listener runs in the capture phase, so a trigger inside a component that calls
event.stopPropagation()still opens its overlay. - the bespoke JSX wrappers (
.triggerIdoverlays,.statictabs, Autocomplete) are now covered by a JS test suite (yarn --cwd js test, vitest + Testing Library), run in CI alongside the bundle-drift check. - the JS build now fails if
yarn.lockresolves more than one copy of any of the shared singleton modules (@mui/private-theming,@mui/styled-engine,@emotion/cache, …). A duplicate copy inside the bundle would silently split the theme context — the failure mode thewindow.jsmoduleruntime warning cannot detect. -
.triggerIdwrappers compose caller-supplied callbacks (onClose, andonClick/onOpenwhere relevant) with their own state handling instead of letting them override it; the wrapper-ownedopen/anchorElprops can no longer be accidentally overridden from R. -
muiMaterialPage()returns atagList()with a hoistedtags$head()instead of nesting a full<html>/<body>document inside the Shiny page body (invalid HTML that relied on browser tag-merging). The body margin is now applied with abody { ... }CSS rule. -
muiMaterialDependency()is now computed once per session instead of reading package metadata from disk for every element created. -
muiMaterialExample()errors with the list of available examples when asked for an unknown example name. - the JS bundle warns at load time if the runtime React provided by shiny.react is not React 18 (the only supported major), and when it overwrites
window.jsmoduleregistrations made by another package with a different copy of MUI/emotion. - action
.shinyInputdocs now state thatonClickis a reserved prop (a caller-suppliedonClickreplaces the click-counter wiring).
Dependencies
- declare and pin the directly-imported
@mui/system,@mui/utils,@mui/private-theming,@mui/styled-engineand@emotion/cacheinjs/package.json(previously resolved implicitly through@mui/material’s dependency tree).
Bug fixes
-
Drawer.triggerId()/SwipeableDrawer.triggerId(): a caller-suppliedslotProps = list(paper = list(sx = ...))given as aJS()function (or an sx array) was silently dropped by the paper merge; sx values now compose via MUI’s array form. A caller-suppliedslotProps.paper.onClickno longer replaces the close-on-link-click handler — the two are composed (wrapper first, then caller). -
Autocomplete/Autocomplete.shinyInput(): aslotPropson the child input element (e.g.TextField(slotProps = list(input = list(startAdornment = ...)))) was clobbered by the wiring MUI v9 passes throughrenderInputparams; the two are now merged slot-by-slot (child wins per key, wiring preserved). -
TransferListexample: use the MUI v9 Grid API (size = list(xs = 5)) instead of the removed v5item/xsprops, givelapply()-generated rows a stablekey, and stop passing the reservedcheckedprop toCheckbox.shinyInput()(the rows now use a plain controlledCheckbox). -
mui-template-dashboardexample: fix a malformedsxvalue in the mobile side menu (leftover JSX pasted inside an R string). -
Checkboxexample: use thevalueargument instead of the reservedcheckedprop.
muiMaterial 0.2.2
CRAN release: 2026-07-02
Dependencies
- update the bundled ‘Material UI’ libraries to their latest releases:
@mui/material9.0.0 -> 9.1.2 and@mui/lab9.0.0-beta.2 -> 9.0.0-beta.5. - refresh development and CI tooling via Renovate: Babel 8, Node 24 in CI, and the
actions/checkout,actions/setup-node,actions/upload-artifactandcodecov/codecov-actionGitHub Actions.
muiMaterial 0.2.1
CRAN release: 2026-06-28
New features
- expose the MUI theming/styling singletons (
@mui/private-theming,@mui/styled-engine) and the emotion cache (@emotion/cache) onwindow.jsmodule. Companion packages (e.g. muiCharts, which bundles@mui/x-charts) can now externalize against this single instance, so aThemeProvider()rendered by muiMaterial reaches the bundled charts. Previously each bundle carried its ownThemeContextand emotion cache, so theming andsxstyling were silently ignored across package boundaries.
muiMaterial 0.2.0
CRAN release: 2026-06-04
Breaking changes
-
TabContext.static()now follows the React<input>convention for tab state ownership. PassdefaultValuefor uncontrolled tabs (the wrapper owns and updates the active tab) andvaluefor controlled tabs (you own it; the value is honored on every render). The previousvalueargument behaved as an uncontrolled seed, so existing code should renamevaluetodefaultValue:# before TabContext.static(value = "one", ...) # after TabContext.static(defaultValue = "one", ...)Code that left
valueunchanged will become controlled and freeze on the first tab (clicks fire but the wrapper no longer updates state) unless anonChangewrites the value back. removed the deprecated
GridLegacy(),PigmentContainer(),PigmentGrid()andPigmentStack()wrappers. These mapped to MUI APIs that are no longer part of the supported@mui/materialsurface; useGrid()(andStack()/Container()) instead.
New features
TabContext.static()gains a controlled mode: passvaluetogether with a writer that updates it (anonChangeonTabList.static()/TabContext.static(), orTab(href = ...)links that change the URL) to make an external source the source of truth. This enables URL-bound, bookmarkable tabs viareactRouter::useParams(as = "value", ...), cross-component tab synchronization, and programmatic tab activation. See the Tabs vignette.TabContext.static()now emits a development console warning when it is used in controlled mode (valuesupplied) without anyonChangeto move the active tab – the same guidance React gives for a controlled<input>with no handler – pointing you to either add anonChangeor switch todefaultValue.new
*.shinyInput()family of Shiny-wired input wrappers covering the most commonly bound components (Autocomplete, BottomNavigation, Button, Checkbox, Dialog, Drawer, IconButton, Input, FilledInput, Fab, FormControlLabel, LoadingButton, Menu, MenuItem, Modal, NativeSelect, OutlinedInput, Pagination, Radio, RadioGroup, Rating, Select, Slider, Snackbar, StepButton, Switch, TabContext, TabList, TabPanel, Tabs, TextField, ToggleButton, ToggleButtonGroup) and matchingupdate*.shinyInput()helpers.new
*.triggerId()family for binding overlay components to an existing DOM element by id, with no server logic required:Dialog.triggerId(),Drawer.triggerId(),Menu.triggerId(),Modal.triggerId(),Popover.triggerId(),SwipeableDrawer.triggerId().Autocomplete.shinyInput()now validates its arguments and warns on conflictingrenderInput/inputProps/ child element combinations.new vignettes and gallery examples; the
mui-template-dashboardexample is available as a live deployment on Posit Connect.
Documentation
- per-component reference pages and runnable
@examplesIf interactive()blocks added to the headline components (Button.shinyInput,TextField.shinyInput,Slider.shinyInput,Autocomplete.shinyInput,Dialog.triggerId,Drawer.triggerId,ThemeProvider,muiMaterialPage). - new “AI-Assisted Development” and per-component vignettes.
Packaging
- bundle and metadata updated for an initial CRAN release:
- MUI Inc. and the Emotion team added to
Authors@Ras copyright holders of the bundled JavaScript. - new top-level
LICENSE.notedocumenting third-party MIT-licensed code shipped ininst/www/muiMaterial/. - README now states that
muiMaterialis an independent community wrapper, not affiliated with or endorsed by MUI Inc.
- MUI Inc. and the Emotion team added to
- minimum R version bumped to R (>= 4.1) to match
shiny.reactand modern Shiny. -
@mui/materialupdated to 9.0.0;@mui/labtracks the upstream 9.0.0-beta.2 release (Material UI Lab is published as a beta channel upstream — see https://mui.com/material-ui/about-the-lab/).
Internal
- improved JS bundling pipeline (webpack 5, exact-version pins, automatic third-party license extraction via
license-webpack-plugin). -
muiMaterialS3 class with aprint()method now applied to all components for browsable preview in the R console. - substantial internal refactor of
R/components.R,R/inputs.Rand the Material UI Lab components.
muiMaterial 0.1.3
CRAN release: 2026-03-15
- BREAKING CHANGE in
muiMaterialPage():- remove
materialSymbolsargument. - add new arguments to access Google Material Icons for use with
Icon(). - rename
addFontRobototouseFontRoboto.
- remove
- add
triggerIdfunctions for managing React internal states:Drawer.triggerId(),Menu.triggerId(),SwipeableDrawer.triggerId(). - add
muiMaterialS3 class to all components with aprint()method for browsable preview. - fix Timeline components sourced from
@mui/lab. - fix Tab components (
TabContext,TabList,TabPanel) sourced from@mui/lab. - move
@mui/labcomponent code fromlab.Rintocomponents.Randinputs.R. - update
mui-template-dashboardexample to use new R functions. - add live Shiny app examples deployed on Posit Connect.
- refactor tests to use
inherits()instead ofclass()for shiny.tag checks. - Update @mui/material and @mui/lab dependencies to their latest version
- improve documentation
muiMaterial 0.1.2
CRAN release: 2026-01-26
- improve examples
-
muiMaterialPage()gives access to Google icons (symbols) and Roboto font. - export
muiMaterialDependency() - improve internal file structure for ThemeProvider and muiMaterialDependency.
