Overview
The reagent-material-ui library is a Reagent wrapper for MUI (formerly Material UI) v5, designed to help ClojureScript/Reagent developers use a modern React UI library without the usual interop hassle. It aims to be comprehensive and up to date with MUI’s original ideas.
Features
- Reagent components mirroring MUI’s modules
- Color definitions from @mui/material/colors
- Helper functions and components from @mui/material/styles
- Helper functions and components from @mui/styles
- Components from MUI Lab
- Components from MUI X
- Adapter for date pickers with cljs-time (goog.date) date objects
Installation
To add MUI to an existing Reagent project, simply add the reagent-material-ui library to your dependencies. Most of the library is in the form of regular Reagent components, which are contained in namespaces that mirror MUI’s modules.
Example code snippet for adding the library to dependencies:
[reagent-material-ui "version"]
Namespaces:
- reagent-mui.components: Reagent components mirroring MUI’s modules
- reagent-mui.colors: Color definitions from @mui/material/colors
- reagent-mui.styles: Helper functions and components from @mui/material/styles
- reagent-mui.jss-styles: Helper functions and components from @mui/styles
- reagent-mui.core: All components from @mui/core
- reagent-mui.lab: All components from @mui/lab
- reagent-mui.x: Components from MUI X
- reagent-mui.cljs-time-adapter: Adapter for using date pickers with cljs-time (goog.date) date objects
Summary
The reagent-material-ui library is a useful tool for ClojureScript/Reagent developers who want to use MUI (formerly Material UI) v5 in their projects without the usual interop difficulties. It provides a comprehensive set of Reagent components, color definitions, and helper functions/components from MUI’s various modules. Additionally, it includes components from MUI Lab and MUI X, as well as an adapter for using date pickers with cljs-time date objects. Installing the library is simple, requiring the addition of a dependency, and the usage is intuitive, with namespaces corresponding to the modules in MUI.