react css framework code example
Example 1: material ui react
// Get the core
npm install @material-ui/core
// Those fancy SVG icons
npm install @material-ui/icons
// Roboto is the font Material-UI is based around, ofc you can omit this
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto:300,400,500,700&display=swap" />
// Font Icons
<link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons" />
Example 2: use styles in react
const useStyles = makeStyles(theme => ({
textField: {
marginLeft: theme.spacing(1),
marginRight: theme.spacing(1),
border: '1px solid red',
},
}));
function App() {
const classes = useStyles();
return (
<TextField
id="outlined-name"
label="Name"
className={classes.textField}
margin="normal"
variant="outlined"
/>
);
}
Example 3: material ui
$ npm install @material-ui/core