[React] Material UI ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ ์‚ฌ์šฉํ•ด๋ณด๊ธฐ
728x90

Today, What I learned?

ํ”„๋กœ์ ํŠธ์— ์“ธ ์ˆ˜๋„ ์žˆ๋Š”(?) UI ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ๋ฅผ ํ•œ๋ฒˆ ๋ง›๋ณด๊ธฐ๋กœ ์‚ฌ์šฉํ•ด ๋ณด์•˜๋‹ค.

์ด๋ฒˆ์— ์ฒ˜์Œ ์•Œ๊ฒŒ ๋˜์—ˆ๋Š”๋ฐ Material UI๋Š” ๋ฆฌ์•กํŠธ UI ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ ์ค‘ ๊ฐ€์žฅ ์œ ๋ช…ํ•œ ๊ฒƒ์ด๋ผ๊ณ !...

์˜ค๋Š˜์€ ๊ฐ„๋žตํ•œ ์„ค์น˜ ๋ฐฉ๋ฒ•๊ณผ ํ™œ์šฉ์— ๋Œ€ํ•ด์„œ ์กฐ๊ธˆ ์ •๋ฆฌํ•ด ๋ณธ๋‹ค.

 

Material UI

Material UI๋Š” ๊ตฌ๊ธ€์˜ Material Design์„ ๋ฐ”ํƒ•์œผ๋กœ ๋งŒ๋“ค์–ด์ง„ ๋ฆฌ์•กํŠธ ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ์ด๋‹ค.

๋ถ€ํŠธ์ŠคํŠธ๋žฉ์ฒ˜๋Ÿผ ๊น”๋”ํ•˜๊ณ  ์ •๋ˆ๋œ UI๋ฅผ ์‰ฝ๊ฒŒ ์‚ฌ์šฉํ•  ์ˆ˜ ์žˆ๋‹ค.

๊ณต์‹ ๋ฌธ์„œ์™€ ์ถ”๊ฐ€์ ์ธ ์ •๋ณด๋Š” ์•„๋ž˜ ์‚ฌ์ดํŠธ์—์„œ ํ™•์ธํ•  ์ˆ˜ ์žˆ๋‹ค.

https://mui.com/

 

MUI: The React component library you always wanted

MUI provides a simple, customizable, and accessible library of React components. Follow your own design system, or start with Material Design.

mui.com

 

 

์„ค์น˜

npm์„ ์ด์šฉํ•œ๋‹ค๋ฉด,

npm install @mui/material @emotion/react @emotion/styled

yarn์„ ์ด์šฉํ•œ๋‹ค๋ฉด,

npm install @mui/material @emotion/react @emotion/styled

 

 

์‚ฌ์šฉ


import Button from '@mui/material/Button';
// or
import { Button } from '@mui/material';

์ด๋ ‡๊ฒŒ ์ปดํฌ๋„ŒํŠธ๋ฅผ import ํ•ด์„œ ์‚ฌ์šฉํ•œ๋‹ค.

 

import Button from '@mui/material/Button';

const Home = () => {
  return <Button size="lg">Text</Button>;
};

export default Home;

MUI์—์„œ ๊ต‰์žฅํžˆ ๋‹ค์–‘ํ•œ ์ปดํฌ๋„ŒํŠธ๋“ค์„ ์ œ๊ณตํ•˜๊ณ , ์•„์ด์ฝ˜๋„ ์“ธ ์ˆ˜ ์žˆ๋‹ค.

 

728x90