The goal of shinyMaterialUI is to provide a wrapper around Material UI, known as the most popular React framework.
Install
remotes::install_github("lgnbhl/shinyMaterialUI")
Example
To quickly get started with any example:
library(shinyMaterialUI)
# all examples available: shinyMaterialUI::runExample()
shinyMaterialUI::runExample("showcase")
You can also run the dashboard Shiny app example:
shinyMaterialUI::runExample("dashboard")
Shiny inputs wrappers
To use Mui Material components as Shiny inputs, the package provides *.shinyInput
wrappers functions (for more info read this article from the shiny.react documentation).
For example, to use the Button
MUI Material component with Shiny, you should use Button.shinyInput()
instead.
Bootstrap conflict
shinyMaterialUI can enter in conflict with the Bootstrap CSS framework, used by default in Shiny functions such as shiny::fluidPage()
and friends.
To normalize the CSS page and be sure the MUI Material UI components render correctly, please wrap them in the function CssBaseline()
.
Given MUI Material UI high customization, you can easily fix styling issues using the CSS proprieties using the sx
argument.
To create a Shiny app without Bootstrap, you can use shinyMaterialUI::shinyMaterialUIPage()
.
Contribute
If you have any issue, question or want to contribute with a pull request, don’t hesitate to write me on https://github.com/lgnbhl/shinyMaterialUI.
For updates follow Felix Luginbuhl on LinkedIn.