4

Multiple Classes in Material UI or MUI

 2 years ago
source link: https://dev.to/rohitnishad613/multiple-classes-in-material-ui-or-mui-3ee6
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
Rohit Nishad

Posted on Oct 4

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 modeExit fullscreen mode

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


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK