ããã«ã¡ã¯ïŒïŒ
æ ªåŒäŒç€ŸUPSIDERã®ãæ¯æã.comãã§ããã³ããšã³ããšã³ãžãã¢ãããŠããŸãOkahashiïŒ@akaneburyoïŒã§ãïŒ
ä»åã¯ãæ¯æã.comããŒã ã§é²ããŠãããã¶ã€ã³ã·ã¹ãã ã®æŽåã«ã€ããŠã玹ä»ããŸãïŒ
ãã£ãã
ãããŸã§æ¯æã.comããŒã ã®éçºã§ã¯ããã¶ã€ããŒã«ãã¶ã€ã³ããé¡ãããããšãããã°ãããã³ããšã³ããšã³ãžãã¢ãPdMããã¶ã€ã³ãææããããšããããŸããã
ããã«ã¯ãã¶ã€ããŒäžåšã®æéããã£ãããšã倧ãã圱é¿ããŠããŸãã
çµæãšããŠã次第ã«ä»¥äžã®ãããªèª²é¡ãç®ç«ã€ããã«ãªã£ãŠããŸããŸããð¢
- 䜿ãæšãŠã®ãã¶ã€ã³ãã¡ã€ã«ãä¹±ç«ããŠãã
- ããŒãžããšã«åŸ®åŠã«ç°ãªãé è²ãã¬ã€ã¢ãŠãã«ãªã£ãŠããç®æããããçµ±äžæãç¡ã
Figmaäžã«ã¯100以äžã®ããŒãžããããã¯ã€ã€ãŒãã¬ãŒã ãæ€èšæ®µéã§äœããã䜿ãæšãŠã®ãã®ãå€ãå«ãŸããŠããŸãð¥
ïŒã¡ãªã¿ã«ããã®ãã¡ã€ã«ã¯ã«ãžã¥ã¢ã«ã«å©çšã§ããPlaygroundãšããŠæ®ããŠããŸãïŒ
ãããªäžããã¶ã€ããŒã®Naoyaãããåç»ããŠãã ãã£ãã®ããã£ããã«ã2024幎9æé ããå°ããã€ãã¶ã€ã³ã·ã¹ãã ã®æŽåãå§ããŸããã
æ¯æã.comã§ãã¶ã€ã³ã·ã¹ãã ãäœãç®ç
æ¯æã.comããŒã ã§ã¯ãäž»ã«ä»¥äžã®ç¹ãç®æããŠãã¶ã€ã³ã·ã¹ãã ãæŽåããŠããŸãã
- ãããã¯ãå šäœã®çµ±äžæãé«ãã䜿ãå¿å°ãåäžããã
- ãã¶ã€ããŒãšãšã³ãžãã¢åæ¹ã®å®è£ ã³ã¹ããåæžãã
- å®è£ ãšãã¶ã€ã³ãã¡ã€ã«åæ¹ã®ã¡ã³ããã³ã¹æ§ãåäžããã
åçŽãªäœ¿ãå¿å°ã®åäžã ãã§ãªããå®è£ ã³ã¹ãã®åæžãšã¡ã³ããã³ã¹æ§ã®åäžã¯å°æ¥çã«ãŠãŒã¶ãŒãžæäŸã§ãã䟡å€ã®æ倧åã«ã€ãªãããšèããŠããŸãã
ãã£ãŠããããš
UPSIDERã«ã¯ããã§ã«ã«ãŒãäºæ¥ã§å©çšããŠãããã¶ã€ã³ã·ã¹ãã ããããŸãã
ãããããŒã¹ã«ãNaoyaãããšããã³ãããŒã ãäž»äœãšãªã£ãŠä»¥äžãé²ããŠããŸãã
- ã³ã³ããŒãã³ãã®å®çŸ©
- ãã¶ã€ã³ããŒã¯ã³ã®å®çŸ©
ïŒãŸãã¯å°ãããã§ããããšããðªïŒ
ã³ã³ããŒãã³ãã®å®çŸ©
åã³ã³ããŒãã³ããæã€ã¹ã¿ã€ã«ãæ¯ãèããå®è£ ãå¯èœãªã¬ãã«ã«ææåããFigmaäžã§æŽçããŠããŸãã
æŽçã¯ããã³ããšã³ããšã³ãžãã¢ãäž»äœãšãªã£ãŠè¡ãã€ã€ããã¶ã€ããŒãã¬ãã¥ãŒãè¡ãããšã§èªèãããããªããé²ããŸãã
åå©çšãããã³ã³ããŒãã³ãã®æŽåãäžå¯§ã«è¡ãããšã³ãžãã¢ãããããªã«ãå®è£ ããäœå°ãæžããããšã§éçºã®å¹çåã«ã€ãªãããšèããŠããŸãã
å°æ¥çã«ã¯ã³ã³ããŒãã³ãã®å€åŽã«çºçããŠããå¶çŽã«ã€ããŠããAutoLayoutãDevModeãé§äœ¿ããŠè¡šçŸããããšèããŠããŸãðª
ãã¶ã€ã³ããŒã¯ã³ã®å®çŸ©
ãŸãã¯è²ããæŽåãé²ããŠããŸãã
æ¯æã.comã§ã¯ã以äžã®2çš®é¡ã®ããŒã¯ã³ãå®çŸ©ããŠããŸãã
- Base Token: ç¹å®ã®èŠçŽ ã«çŽã¥ããªãæ±çšçãªããŒã¯ã³
- Alias Token: Base Tokenãç¶æ¿ããç¹å®ã®èŠçŽ ã«çŽã¥ããããŒã¯ã³
ãããã¯ãFigmaäžã§ããŒã«ã«ããªã¢ãã«ãšããŠãããããå¥ã ã®ã³ã¬ã¯ã·ã§ã³ã«å®çŸ©ããŠããŸãã
ããã«ãBase TokenãçŽæ¥å©çšããŠããŸã£ãããAlias Tokenãæå³ããªãçšéã§å©çšããŠããŸãããšãé²ããããå¯èœãªéãã«ã©ãŒã®ã¹ã³ãŒããå¶éããŠããŸãã
ããã³ããšã³ãã§ã¯Tailwind CSSãå©çšããŠãããããŒã¯ã³ã¯ããŒããšããŠè¡šçŸããŸãã
ããã§ãFigmaãšåæ§ã«ãçšéã«å¿ããŠã¹ã³ãŒããçµã£ãŠå®çŸ©ããŸãã
const BASE_COLOR_TOKENS = { primary: { [500]: '#08979C' }, ...{ãã®ã»ãã®è²å®çŸ©} } const ALIAS_COLOR_TOKENS = { text: { primary: { dark: tinycolor(BASE_COLOR_TOKENS.primary).darken(7.5).toHexString(), base: BASE_COLOR_TOKENS.primary, light: tinycolor(BASE_COLOR_TOKENS.primary).lighten(7.5).toHexString(), } } ...{ãã®ã»ãã®è²å®çŸ©} } export default { theme: { colors: { // ã°ããŒãã«ã§å©çšå¯èœãªè²ã¯å®çŸ©ããªã }, textColor: ALIAS_COLOR_TOKENS.text, backgroundColor: ALIAS_COLOR_TOKENS.background, borderColor: ALIAS_COLOR_TOKENS.border, divideColor: ALIAS_COLOR_TOKENS.border, outlineColor: ALIAS_COLOR_TOKENS.border, } ...{ãã®ã»ãã®èšå®} }
ãŸããããã§ã¯:hover
:active
ãªã©ã®äžæçãªç¶æ
ã§å©çšããè²ãšããŠãdark
ãlight
ã®è²ãå®çŸ©ããŠããŸãã
ãããã®è²ã¯tinycolorãå©çšããŠããã³ããšã³ãã§èšç®ãè¡ã£ãŠããããã¶ã€ã³ãã¡ã€ã«äžã®Alias Token
ã«ã¯å®çŸ©ããŠããŸããã
ãã¶ã€ã³ãã¡ã€ã«ãšå®è£ ã®ããããã§ã¡ã³ããã³ã¹ã³ã¹ããæå°åãã€ã€ãå šäœã§çµ±äžããããã«ç°¡ç¥åããæå³ã§ãå®éšçã«åãå ¥ããŠããŸãã
ããããå ã«ãå°ããã€ããã³ããšã³ããžåæ ããŠããŸãã
ãããã
ãŸã ãŸã åæ ããããŠããªãç®æãå€ããæ¥ã ã®ãããã¯ãã®éçºãšäžŠè¡ããŠæ®µéçã«ãªãªãŒã¹ãè¡ãªã£ãŠãããŸãðª
ãŸããè©Šéšçãªå 容ãå°ãå«ãã§ãããããèšèŒããå 容ããã¢ããããŒãããå¯èœæ§ã倧ãã«ãããŸãã
æçµçãªå®æ圢ã«ã€ããŠããæ¹ããŠããã°ã§ã玹ä»ã§ããã°ãšæããŸãð¥
ä¹ããæåŸ ãã ããïŒ