yarn add @material-ui/core
Then, inside a page we can use it like below:
import { Button } from "@material-ui/core";
export default function Home() {
return <Button color="primary">Hello World</Button>;
}
Here we first import only the Button component from material-ui. Then we use it in our page.
Button
is a named import, not a default one. Keep that in mind to save time.