All Projects → arttuka → reagent-material-ui

arttuka / reagent-material-ui

Licence: EPL-2.0 license
Reagent wrapper for MUI (formerly Material UI) v5

Programming Languages

clojure
4091 projects

Projects that are alternatives of or similar to reagent-material-ui

universal-json-schema
📜 Universal JSON Schema Form - Currently Support for React - Material UI components for building Web forms from JSON Schema.
Stars: ✭ 102 (-31.54%)
Mutual labels:  material-ui, mui
Cljs React Material Ui
Clojurescript library for using material-ui.com
Stars: ✭ 204 (+36.91%)
Mutual labels:  material-ui, reagent
mui-kotlin
Kotlin/JS support for Material-UI
Stars: ✭ 25 (-83.22%)
Mutual labels:  material-ui, mui
remindoro
📝 Chrome/Firefox Extension to get reminders(repeat/one-time). Edit notes with live rich text editor. 🗃️
Stars: ✭ 16 (-89.26%)
Mutual labels:  material-ui, mui
website
Official dahliaOS website
Stars: ✭ 29 (-80.54%)
Mutual labels:  material-ui, mui
jss-material-ui
A enhanced styling engine for material-ui
Stars: ✭ 15 (-89.93%)
Mutual labels:  material-ui, mui
react-typescript-material-ui-with-auth-starter
React + Material UI + Auth starter using TypeScript
Stars: ✭ 27 (-81.88%)
Mutual labels:  material-ui, mui
recode-converter
A modern & simple audio converter for video files
Stars: ✭ 22 (-85.23%)
Mutual labels:  material-ui, mui
Smartlist
Smartlist's a free home inventory and finance tracker to help you overcome financial struggle.
Stars: ✭ 1 (-99.33%)
Mutual labels:  material-ui, mui
ioBroker.jarvis
jarvis - just another remarkable vis
Stars: ✭ 129 (-13.42%)
Mutual labels:  material-ui
nested-task-list-mobx-react
A nested task list prototype built with React + MobX and Material-ui
Stars: ✭ 25 (-83.22%)
Mutual labels:  material-ui
React-MaterialUI-Starter-Kit
The ReactJs 16 start kit that include Redux, Material UI, Babel 7 and Webpack 4
Stars: ✭ 48 (-67.79%)
Mutual labels:  material-ui
circular progress
Different types of Circular progressbar in flutter
Stars: ✭ 55 (-63.09%)
Mutual labels:  material-ui
dl-model
Dragalia Lost Model Viewer
Stars: ✭ 30 (-79.87%)
Mutual labels:  material-ui
Alicorn
A high performance custom Minecraft launcher.
Stars: ✭ 26 (-82.55%)
Mutual labels:  material-ui
uv-index
This is a work-in-progress (🔧️) ultraviolet index viewer app for demonstrating Instant Apps + Kotlin + Dagger + MVP
Stars: ✭ 64 (-57.05%)
Mutual labels:  material-ui
react-js-boilerplate
A React + Redux + HOT + Webpack + Material-UI + Sass boilerplate
Stars: ✭ 14 (-90.6%)
Mutual labels:  material-ui
shadow-reagent
Starting point for ClojureScript apps with shadow-cljs, proto-repl, and reagent.
Stars: ✭ 35 (-76.51%)
Mutual labels:  reagent
codesunaba
A simple ClojureScript code sandbox in your browser.
Stars: ✭ 18 (-87.92%)
Mutual labels:  reagent
personal-website-react
👨‍💻 A clean, responsive, single-page webapp template for developers.
Stars: ✭ 80 (-46.31%)
Mutual labels:  material-ui

reagent-material-ui

Actions Status

reagent-material-ui is a Reagent wrapper for MUI (formerly Material UI) v5.

The purpose of this library is to help ClojureScript/Reagent developers use a modern React UI library without the hassle that Reagent/React interop usually is. It is meant to be comprehensive and up to date.

Usage

If you aren't familiar with MUI or its documentation yet, that is the best place to start. Their examples are very good. and this library tries to follow the original ideas as well as possible. See the example project for a simple usage example.

To add MUI to an existing Reagent project, just add this library to your dependencies:

[arttuka/reagent-material-ui "5.6.2-1"]

Most of the library is in the form of regular Reagent components. Each component is contained in a namespace that mirrors MUI's modules. For example, @mui/material/IconButton becomes reagent-mui.material.icon-button/icon-button and @mui/icons-material/Menu becomes reagent-mui.icons.menu/menu.

Namespace reagent-mui.components contains a copy of each component from @mui/material for ease of use.

Namespace reagent-mui.colors contains all color definitions from @mui/material/colors. The colors are organized in a single namespace, so @mui/material/colors/red becomes reagent-mui.colors/red.

Namespace reagent-mui.styles contains helper functions and components from @mui/material/styles.

Namespace reagent-mui.jss-styles contains helper functions and components from @mui/styles.

Namespace reagent-mui.core contains all components from @mui/core.

MUI Lab

This library also includes components from MUI Lab.

Namespace reagent-mui.lab contains all components from @mui/lab.

MUI X Pro

This library also includes components from MUI X. Namespace reagent-mui.x contains those components.

MUI X components are only supported in projects with NPM dependencies. They can't be used in projects with CLJSJS sources.

Namespace reagent-mui.cljs-time-adapter contains an adapter that lets you use the date pickers with cljs-time (goog.date) date objects. reagent-mui.x.localization-provider accepts this adapter as its date-adapter property. The locale prop must be an instance of goog.i18n.DateTimeSymbols. The default locale is used if no locale prop is given. See the example project for a usage example.

If you want to use another date library, you can use adapters from @mui/x-date-pickers.

Using npm dependencies with Figwheel Main

To use npm dependencies with Figwheel Main, you need to exclude prebuilt JS files (React from CLJSJS and MUI from this library). To do so, add these exclusions to your dependency. See the example project for working configuration.

[arttuka/reagent-material-ui "5.6.2-1" :exclusions [arttuka/reagent-material-ui-js]]

MUI component names with shadow-cljs

The compiler used by shadow-cljs will remove local function names, causing most MUI component to show as Anonymous in React Devtools. If you want to keep the names, add :js-options {:anon-fn-naming-policy :unmapped} to your build in shadow-cljs.edn.

Common pitfalls in Reagent/React interop

  • Some components want to have a React node as a prop. A Reagent component is not good enough and will just result in errors about invalid React nodes. reagent.core/as-element can turn a Reagent component into a React node.
  • React hooks can't be used in most Reagent components. More information.
  • Higher order React components can only deal with components that take all their parameters (including children) in a single map.

For more information, check out Reagent's interop guide.

Development

Bug reports, pull requests and ideas for improvement are very welcome. No external services are needed for getting the library up and running.

Tests

Run tests on the command line with npm run test, or in the browser with npm run test:browser. The browser test runner will start at localhost:9500.

The build process also includes lein cljfmt.

Version numbers

The project follows MUI's version numbering.

  • Current @mui/material version: 5.6.2
  • Current @mui/icons-material version: 5.6.2
  • Current @mui/lab version: 5.0.0-alpha.78

License

This project is licensed under the Eclipse Public License 2.0.

Parts of example project are copyright (c) 2013-2017 Dan Holmsand and Reagent contributors, used under the terms of the MIT License. Material UI Icons are copyright (c) Material UI contributors, used under the terms of the MIT License.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].