Home > Web Front-end > JS Tutorial > What is Material-UI in React

What is Material-UI in React

coldplay.xixi
Release: 2020-12-22 17:01:34
Original
3751 people have browsed it

Material-UI in React is a React component library that implements Google's Material Design style UI interface framework. It is also one of the first React UI toolsets. It can be used to quickly build a pleasing application interface.

What is Material-UI in React

Material-UI is a React component library to implement Google's Material Design style UI interface framework. It is also one of the first UI toolsets for React. Use it to quickly build a pleasing application interface.

How to install Material-UI?

// 安装material-ui
npm  install  @material-ui/core
// 安装material  icons
npm  install  @material-ui/icons
Copy after login

Quick Start Use

Material-UI components are independent and self-supporting, and only inject the styles required by the current component when working. These Material-UI components do not rely on any global style sheets, although Material-UI provides the optional CssBaseline component.

import React from 'react';
import ReactDOM from 'react-dom';
import Button from '@material-ui/core/Button';  // 导入Button组件
function App() {
  return (
    <Button variant=&#39;contained&#39; color=&#39;primary&#39;>按钮</Button>
  );
}
ReactDOM.render(<App />, document.querySelector(&#39;#app&#39;));
Copy after login

Support for components

While Materail-UI strives to follow practical guidelines, it does not expect to support every component or every feature of a component. Materail-UI hopes to provide a set of building blocks and experiences that help developers create compelling user interfaces.

Related free learning recommendations: javascript (video)

The above is the detailed content of What is Material-UI in React. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template