mirror of
https://github.com/Segate-ekb/publicator.git
synced 2024-11-24 08:02:30 +02:00
45 lines
1.5 KiB
Markdown
45 lines
1.5 KiB
Markdown
|
# Material UI - Create React App example
|
||
|
|
||
|
## How to use
|
||
|
|
||
|
Download the example [or clone the repo](https://github.com/mui/material-ui):
|
||
|
|
||
|
<!-- #default-branch-switch -->
|
||
|
|
||
|
```sh
|
||
|
curl https://codeload.github.com/mui/material-ui/tar.gz/master | tar -xz --strip=2 material-ui-master/examples/material-cra
|
||
|
cd material-cra
|
||
|
```
|
||
|
|
||
|
Install it and run:
|
||
|
|
||
|
```sh
|
||
|
npm install
|
||
|
npm start
|
||
|
```
|
||
|
|
||
|
or:
|
||
|
|
||
|
<!-- #default-branch-switch -->
|
||
|
|
||
|
[![Edit on CodeSandbox](https://codesandbox.io/static/img/play-codesandbox.svg)](https://codesandbox.io/s/github/mui/material-ui/tree/master/examples/material-cra)
|
||
|
|
||
|
<!-- #default-branch-switch -->
|
||
|
|
||
|
[![Edit on StackBlitz](https://developer.stackblitz.com/img/open_in_stackblitz.svg)](https://stackblitz.com/github/mui/material-ui/tree/master/examples/material-cra)
|
||
|
|
||
|
## The idea behind the example
|
||
|
|
||
|
<!-- #default-branch-switch -->
|
||
|
|
||
|
This example demonstrates how you can use [Create React App](https://github.com/facebookincubator/create-react-app) with Material UI.
|
||
|
It includes `@mui/material` and its peer dependencies, including [Emotion](https://emotion.sh/docs/introduction), the default style engine in Material UI v5.
|
||
|
If you prefer, you can [use styled-components instead](https://mui.com/material-ui/guides/interoperability/#styled-components).
|
||
|
|
||
|
## What's next?
|
||
|
|
||
|
<!-- #default-branch-switch -->
|
||
|
|
||
|
You now have a working example project.
|
||
|
You can head back to the documentation, continuing browsing it from the [templates](https://mui.com/material-ui/getting-started/templates/) section.
|