1// Get the core
2npm install @material-ui/core
3
4// Those fancy SVG icons
5npm install @material-ui/icons
6
7// Roboto is the font Material-UI is based around, ofc you can omit this
8<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto:300,400,500,700&display=swap" />
9
10// Font Icons
11<link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons" />
1
2//install in the terminal
3$ npm install @material-ui/core
4
5// use the CDN
6<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto:300,400,500,700&display=swap" />
7
8//on the component
9import { Button } from '@material-ui/core';
10
11function App() {
12 return <Button color="primary">Hello World</Button>;
13}
1
2CDN
3You can start using Material-UI with minimal Front-end infrastructure, which is great for prototyping.
4
5Two Universal Module Definition (UMD) files are provided:
6
7one for development: https://unpkg.com/@material-ui/core@latest/umd/material-ui.development.js
8one for production: https://unpkg.com/@material-ui/core@latest/umd/material-ui.production.min.js
9
10Material-UI is available as an npm package.
11
12npm
13To install and save in your package.json dependencies, run:
14
15// with npm
16npm install @material-ui/core
17
18// with yarn
19yarn add @material-ui/core
20
21