DEV Community

Rohit Nishad
Rohit Nishad

Posted on

Multiple Classes in Material UI or MUI

You can either use a proper String concatenation or if your needs are wide and highly used then I recommend adding a package for this purpose. In this post, we talk about Multiple classes in Material UI.

So let’s add Multiple classes in Material UI with or without usestyles, withstyles, makestyle.

Method #1: Concat classes properly in className property

You can concat your classes with backticks

const classes = usestyles()
className={`${classes.container} ${classes.spacious}`}
Enter fullscreen mode Exit fullscreen mode

For more info and credit read this blog post from 360TechExplorer.com

Top comments (0)