menu

Material-UI

React components for faster and easier web development. Build your own design system, or start with Material Design.

Channels
Team
Posts
Members
Info

Overwriting propTypes?

In my usage of some MUI components, I have extended the color prop to accept additional values that aren't supported by MUI natively. I'm trying to figure out the best way to suppress the propType warnings for using a non-supported color value without losing all type safety. The…

thumbsup
0
message-simple
0

How to execute code in a child component inside of a Drawer.

I have a component whose render creates a <Drawer /> and then hosts different children depending upon a particular mode. I need to execute some method on a child component of this component when onClose is executed by Mui. The Drawer is currently temporary. I've tried passing a…

thumbsup
0
message-simple
2

Adding more colors to a Palette

Does anyone have a suggestion for implementing themes which use more than the default 'primary', 'secondary', 'error', and 'grey' colors? I've been reading the design recommendations in the Material documentation and saw that there is a case study showing a template with five…

thumbsup
0
message-simple
0

Best practice to check for window size inline?

What's the easiest way to change layout based on window size? I have tabs that I want vertically for mdDown and horizontal for the rest. <Tabs orientation= {mdDown ? "vertical" : "horizontal"} …

thumbsup
0
message-simple
1

Should @material-ui/icons be a peer dependency?

Hey all, my team is building a React component library. For icons, we've chosen to use Material UI icons because we love how they look. Our library imports and immediately exports all the named icon components from @material-ui/icons. This definitely increases the library's…

thumbsup
3
message-simple
0

GridListTile / Lazy Image loading / Images not vertical centered

How can I replace this image with React Lazy Load Image Component without loosing this behaviour? https://stackoverflow.com/questions/57919388/gridlisttile-lazy-image-loading-images-not-vertical-entered

thumbsup
0
message-simple
0

Change a Theme using a Button

Hey all. Could someone give me some info on how to change the page theme using a 'AppBar' Button? Should I create a React.Context to hook the "Theme btn"? …

thumbsup
0
message-simple
1

Override MuiGrid Spacing Item

Hello all. I want to access MuiGrid-item here: I try: …

thumbsup
0
message-simple
5

makeStyles and related functions: from core or from styles packages?

Hi, I'm a little confused as to what is the right way to import makeStyles and the related styling functions and components. In the docs a search for makeStyles reveals that it's documented in the API section of the @material-ui/styles package, yet some examples, i.e. here,…

thumbsup
0
message-simple
0

warning messages after migration

After migration version 4.5 i am facing the below warning messages in my console: warning ” > @material-ui/icons@3.0.2" has incorrect peer dependency “@material-ui/core@^3.0.0". warning ” > @material-ui/lab@3.0.0-alpha.30" has incorrect peer dependency…

thumbsup
0
message-simple
0