Home > Article > Web Front-end > What is Material-UI in React
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.
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='contained' color='primary'>按钮</Button> ); } ReactDOM.render(<App />, document.querySelector('#app'));
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!