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

What is Material-UI in React

coldplay.xixi
coldplay.xixiOriginal
2020-11-27 09:31:103681browse

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

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;));

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!

Statement:
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

Related articles

See more