MaterialUI中文使用指南

MaterialUI

ReactUI组件库,用于快速构建界面和设计系统。官网默认版本为v4.11.1(截止到2021年3月11日)。

安装

支持使用npm或者使用CDN加载。

npm

npm install @material-ui/core

CDN

加载Roboto字体

<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto:300,400,500,700&display=swap" />

简单使用指南

import React from 'react';
import {
    Button } from '@material-ui/core';

function App() {
   
    return <Button color="primary">Hello World</Button>;
}

主要使用的组织

  • NASA
  • 沃尔玛实验室
  • 凯捷咨询
  • 优衣库
  • 摩根大通
  • Bethesda
  • shutterstock
  • NETFLIX
  • 亚马逊
  • Unity
  • Spotify

社区地址

许可证类型

MIT协议

常用组件介绍

Avatar

头像组件

小览

import React from 'react';
import {
    makeStyles, createStyles, Theme } from '@material-ui/core/styles';
import Avatar from '@material-ui/core/Avatar';

const useStyles = makeStyle((theme: Theme) =>
    createStyles({
   
        root: {
   
            display: 'flex',
            '& > *': {
   
                margin: theme.spacing(1),
            },
        },
    }),
);

export default function ImageAvatars() 
  • 1
    点赞
  • 11
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值