๐Ÿ’ป My Work/๐ŸŽจ Material Design 19

[Material Design] Material-UI(MUI) <palette colors ์ปค์Šคํ…€ํ•ด์„œ ์ƒ‰ ์ถ”๊ฐ€ํ•˜๊ธฐ>

default theme default theme์—์„œ palette๋ฅผ ๋ณด์ž๋ฉด ์•„๋ž˜์™€ ๊ฐ™์Šต๋‹ˆ๋‹ค. Default theme - Material UI Here's what the theme object looks like with the default values. mui.com Palette ์ปค์Šคํ…€ Palette - Material UI The palette enables you to modify the color of the components to suit your brand. mui.com ์ €๋Š” ์•„๋ž˜์™€ ๊ฐ™์ด myBlue ๋ฅผ ์ƒˆ๋กœ ์ •์˜ํ•ด์„œ ์ถ”๊ฐ€ํ–ˆ์Šต๋‹ˆ๋‹ค. import { createTheme, ThemeProvider, responsiveFontSizes, } from "@mui/material/style..

[Material Design] Material-UI(MUI) <์ค„๋ฐ”๊ฟˆ, white-space : "pre-wrap" ์†์„ฑ>

์•„๋ž˜์™€ ๊ฐ™์ด ์ค„๋ฐ”๊ฟˆ์ด ์ ์šฉ๋˜๊ฒŒ ํ•˜๋ ค๊ณ  ํ•ฉ๋‹ˆ๋‹ค. ํ˜„์žฌ ์ฝ”๋“œ๋Š” ์•„๋ž˜์™€ ๊ฐ™์Šต๋‹ˆ๋‹ค. import LightbulbOutlinedIcon from "@mui/icons-material/LightbulbOutlined"; {`๊ณผํ•™ ๊ณตํ•™`} white-space ์†์„ฑ(pre, pre-wrap, pre-line ์ฐจ์ด) white-space ์†์„ฑ(pre, pre-wrap, pre-line ์ฐจ์ด) ์˜ค๋Š˜์€ ์š”์†Œ ์•ˆ์— ๊ณต๋ฐฑ ์ฒ˜๋ฆฌ๋ฅผ ์–ด๋–ป๊ฒŒ ํ• ์ง€ ์ง€์ •ํ•˜๋Š” ์†์„ฑ์ž…๋‹ˆ๋‹ค. white space๋ž€ ์—ฌ๋ฐฑ์ด๋ผ๊ณ ๋„ ํ•˜๋Š”๋ฐ html์—์„œ๋Š” ๊ณต๋ฐฑ, ๊ณต๋ž€์œผ๋กœ ์ดํ•ดํ•˜๋ฉด ๋ฉ๋‹ˆ๋‹ค. โ–ถํƒœ๊ทธ ์ž‘ aboooks.tistory.com ์œ„ ๋ธ”๋กœ๊ทธ ๊ธ€์„ ์ฐธ๊ณ ํ•˜์—ฌ ์ค„๋ฐ”๊ฟˆ์„ ์ ์šฉํ•˜๊ธฐ ์œ„ํ•ด ์•„๋ž˜์™€ ๊ฐ™์ด ์ž‘์„ฑํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. {cont.icon} {`๊ณผํ•™ ๊ณตํ•™`}

[Material Design] Material-UI(MUI) <๊ธ€์ž ์ˆ˜ ๋„˜์–ด๊ฐ€๋ฉด ๋ง์ค„์ž„ํ‘œ / ์›ํ•˜๋Š” ๋งŒํผ์˜ ์ค„๋งŒ ๋ณด์ด๊ฒŒ ํ•˜๊ธฐ>

Material ui text ellipsis after two line How can I ellipsis a text after two line in material ui? Here https://material-ui.com/system/display/#text-overflow show for single line stackoverflow.com ์ปจํ…์ธ  ๋‚ด์šฉ โœจโœจโœจ

[Material Design] Material-UI(MUI) : Styled Component Using the theme

styled() - MUI System Utility for creating styled components. mui.com ์ด์ „์— ์ •๋ฆฌํ•ด๋†“์€ ๊ธฐ๋ณธ ์ปดํฌ๋„ŒํŠธ๋ฅผ ์ปค์Šคํ…€ ํ•˜๋Š” ๋ฐฉ๋ฒ•์ž…๋‹ˆ๋‹ค. [Material Design] Material-UI(MUI)๋กœ react & styled component ์‚ฌ์šฉํ•˜๊ธฐ ({ color: theme.palette.primary.contrastText, backgroundColor: theme.palette.primary.main, padding: theme.spacing(1), borderRadius: theme.shape.borderRadius, })); export default function ThemeUsage() { return ( Styled div with th..

[Material Design] Material-UI(MUI) : Overriding nested component styles - CardContent padding customize

โœจ Overriding nested component styles https://mui.com/material-ui/customization/how-to-customize/ How to customize - Material UI Learn how to customize Material UI components by taking advantage of different strategies for specific use cases. mui.com ๐Ÿ’ก์ค‘์ฒฉ๋œ ์ปดํฌ๋„ŒํŠธ style์„ override ํ•˜๊ธฐ ์œ„ํ•ด์„  ์ปดํฌ๋„ŒํŠธ์˜ css ํด๋ž˜์Šค ์ด๋ฆ„์„ ์‚ฌ์šฉํ•ด์„œ CSS selector๋ฅผ ์ž‘์„ฑ ํ›„, ์ปค์Šคํ…€ํ•ด์ฃผ๋ฉด ๋ฉ๋‹ˆ๋‹ค. ์˜ˆ๋ฅผ ๋“ค์–ด, ํ•ด๋‹น ์ปดํฌ๋„ŒํŠธ์˜ ํด๋ž˜์Šค ์ด๋ฆ„์ด MuiSlider-thumb ์ผ ๋•Œ, & .MuiSlider-th..

[Material Design] Material-UI(MUI) : Masonry, Grid (์ปดํฌ๋„ŒํŠธ ๋‚˜์—ดํ•˜๊ธฐ, ๊ฐ€๋กœ๋กœ ๋‚˜๋ž€ํžˆ ๋†“๊ธฐ)

00. Masonry https://mui.com/material-ui/react-masonry/ React Masonry component - Material UI Masonry lays out contents of varying dimensions as blocks of the same width and different height with configurable gaps. mui.com ๋†’์ด๊ฐ€ ์ œ๊ฐ๊ฐ์ธ ์ปดํฌ๋„ŒํŠธ๋ฅผ ๊ฐœ์„ฑ์žˆ๊ฒŒ, ์—์˜๊ฒŒ ๊ตฌํ˜„๊ฐ€๋Šฅํ•œ ์ปดํฌ๋„ŒํŠธ์ž…๋‹ˆ๋‹ค. ๋†’์ด๊ฐ€ ๋‹ฌ๋ผ๋„, ์„œ๋กœ์˜ ๋†’์ด์— ๊ตฌ์• ๋ฐ›์ง€ ์•Š๊ณ  ์ซ˜๋ผ๋ฝ ๋‚˜์—ด๋ฉ๋‹ˆ๋‹ค. ๊ธฐ๋ณธ์ ์ธ ์ฝ”๋“œ๋Š” ์•„๋ž˜์™€ ๊ฐ™์Šต๋‹ˆ๋‹ค.๐ŸŒˆ import * as React from 'react'; import Box from '@mui/material/Box'; import Maso..

[Material Design] Material-UI(MUI)๋กœ react & styled component ์‚ฌ์šฉํ•˜๊ธฐ <๋ฌดํ•œ ์Šคํฌ๋กค ๊ตฌํ˜„ํ•˜๊ธฐ - Select>

๋ชจ~~~๋“  ์ •๋ณด๋ฅผ ํ•œ๋ฒˆ์— ๊ฐ€์ ธ์™€๋ฒ„๋ฆฌ๋ฉด, ๋น„ํšจ์œจ์ ์ด๊ฒ ์ฃ . ๊ฝค๋‚˜ ๋งŽ์€ ์‚ฌ์ดํŠธ์—์„œ ๋ฌดํ•œ ์Šคํฌ๋กค๋กœ ์ด๋ฅผ ํ•ด๊ฒฐํ•˜๋Š” ๊ฒƒ์„ ๋ณผ ์ˆ˜ ์žˆ์–ด์š”!๐Ÿ˜๐Ÿ˜ ๊ตฌํ˜„ํ•ด๋ด…์‹œ๋‹ค!!! ์šฐ์„ , ์ตœ์ข…์ ์ธ ์ฝ”๋“œ๋Š” ์•„๋ž˜์™€ ๊ฐ™์Šต๋‹ˆ๋‹ค. ์•„๋ž˜ ์˜ˆ์‹œ๋Š” ์˜ํ™” ์ด๋ฆ„์„ ๊ฐ€์ ธ์˜ค๋Š” API๋ฅผ ์ด์šฉํ–ˆ์Šต๋‹ˆ๋‹ค.๐Ÿ”ฅ import * as React from "react"; import { Select, MenuItem, FormControl, InputLabel } from "@mui/material"; export default function App() { const PANEL_HEIGHT = 240; // ํŒจ๋„ ๋†’์ด /** ์„ ํƒํ•œ item */ const [selectItem, setSelectItem] = React.useState(""); /** ์ด menu it..

[Material Design] Material-UI(MUI)๋กœ react & styled component ์‚ฌ์šฉํ•˜๊ธฐ <๋ ˆ๋ฒจ๋ฐ”, ์ง„ํ–‰๋ฐ”, Progressbar, Levelbar>

https://mui.com/material-ui/react-progress/ Circular, Linear progress React components - Material UI Progress indicators commonly known as spinners, express an unspecified wait time or display the length of a process. mui.com ์ง„ํ–‰๋ฐ”๋ฅผ ์‚ฌ์šฉํ•ด์„œ, ๋ ˆ๋ฒจ๋ฐ”๋ฅผ ๊ตฌํ˜„ํ•˜๊ฒ ์Šต๋‹ˆ๋‹ค! 00. Linear progress ๋ณธ๋ชจ์Šต์€ ์›๋ž˜ ์ด๋ ‡๊ฒŒ ์ƒ๊ฒผ์Šต๋‹ˆ๋‹ค. 01. Linear progress Customization mui์—์„œ ๋‚˜์˜จ ๊ฒƒ์ฒ˜๋Ÿผ, ์ด์™€ ๊ฐ™์ด ์ปค์Šคํ…€ ๊ฐ€๋Šฅํ•ฉ๋‹ˆ๋‹ค. import { styled } from '@mui/material/style..

[Material Design] Material-UI(MUI)๋กœ react & styled component ์‚ฌ์šฉํ•˜๊ธฐ <ํŠน์ • ๊ธธ์ด ๋„˜์–ด๊ฐ€๋ฉด ...>

https://mui.com/system/display/ Display - MUI System Quickly and responsively toggle the display value of components and more with the display utilities. Includes support for some of the more common values, as well as some extras for controlling display when printing. mui.com ์ œ๋ชฉ ์“ฐ๊ณ ๋‚˜์„œ ๋ณด๋‹ˆ, ๋ง์„ ํ•˜๋‹ค ๋งŒ ๊ฒƒ ๊ฐ™์•„์„œ ์ข€ ์›ƒ๊ธฐ๋‹ค. (๋ง˜์— ๋“ ๋‹ค.) ์œ„์™€ ๊ฐ™์€ ์‹์œผ๋กœ!! ์ผ์ • ๊ธธ์ด๋ฅผ ๋„˜์œผ๋ฉด ... ์œผ๋กœ ์ƒ๋žต ๋˜๋Š” ๊ฑธ ๋งŽ์ด ๋ณด์…จ์„ ๊ฑฐ์—์š”! ์ด๊ฑธ ๊ตฌํ˜„ํ• ๊ฒŒ์š”! 00. Text overflow :..

[Material Design] Material-UI(MUI)๋กœ react & styled component ์‚ฌ์šฉํ•˜๊ธฐ <TextField - input ์ž…๋ ฅ ์ œํ•œ ๊ธฐ๋Šฅ (๊ธ€์ž ์ˆ˜ ์ œํ•œ, ๋น„๋ฐ€๋ฒˆํ˜ธ)>

์œ„์™€ ๊ฐ™์ด ๊ธ€์ž ์ˆ˜ ์ œํ•œ input ๋งŽ์ด ๋ณด์…จ์„ ๊ฑฐ์—์š”!!! ๋˜ํ•œ, ๋น„๋ฐ€๋ฒˆํ˜ธ์™€ ๊ฐ™์ด ๋ณด์•ˆ๋ฌธ์ œ๋ฅผ ์œ„ํ•ด ์ž…๋ ฅ๊ฐ’์ด ์•ˆ ๋ณด์ด๋„๋ก ํ•˜๋Š” input๋„ ๋งŽ์ด ๋ณด์…จ์„ ๊ฑฐ์—์š”!!! ๊ตฌํ˜„ํ•ด๋ด…์‹œ๋‹ค. 00. ๊ธ€์ž ์ˆ˜ ์ œํ•œ import { TextField } from "@material-ui/core"; /** ๋‹‰๋„ค์ž„ ์ตœ๋Œ€ ๊ธธ์ด */ const NICKNAME_LIMIT = 20; /** ๋‹‰๋„ค์ž„ ์ž…๋ ฅ๊ฐ’ */ const [values, setValues] = React.useState({ nickName: "" }); const handleChange = (nickName) => (event) => { setValues({ ...values, [nickName]: event.target.value }); }; ... TextF..