Search

์ƒ˜ํ”Œ

03. ์ƒ˜ํ”Œ โ€” Figma to Code

์ƒ˜ํ”Œ 1: Tailwind (JSX) ๋ณ€ํ™˜

Figma ์ž…๋ ฅ

โ€ข
Card ๋…ธ๋“œ (Auto Layout, padding 24, gap 16)
โ€ข
Avatar (์›ํ˜• ์ด๋ฏธ์ง€) + Title (ํ…์ŠคํŠธ) + Description (ํ…์ŠคํŠธ)

ํ”Œ๋Ÿฌ๊ทธ์ธ ์ถœ๋ ฅ (Tailwind JSX)

<div className="inline-flex flex-col items-start justify-start gap-4 p-6 bg-white rounded-xl"> <img className="w-12 h-12 rounded-full" src="..." /> <div className="flex flex-col gap-1"> <div className="text-base font-bold text-gray-900">User Name</div> <div className="text-sm text-gray-500">user@example.com</div> </div> </div>
JavaScript
๋ณต์‚ฌ
๊ฒฐ์ •์  ๋ณ€ํ™˜์ด๋ผ ์ปดํฌ๋„ŒํŠธํ™”/Propsํ™”๋Š” ๋ณ„๋„ โ€” ๊ทธ๋Œ€๋กœ ๋‘๋ฉด ์ •์  ๋งˆํฌ์—….

์ƒ˜ํ”Œ 2: Flutter ๋ณ€ํ™˜

ํ”Œ๋Ÿฌ๊ทธ์ธ ์ถœ๋ ฅ

Container( padding: const EdgeInsets.all(24), decoration: BoxDecoration( color: const Color(0xFFFFFFFF), borderRadius: BorderRadius.circular(12), ), child: Column( mainAxisSize: MainAxisSize.min, crossAxisAlignment: CrossAxisAlignment.start, children: [ Container( width: 48, height: 48, decoration: BoxDecoration( shape: BoxShape.circle, image: DecorationImage(image: NetworkImage('...')), ), ), const SizedBox(height: 16), const Text('User Name', style: TextStyle(fontSize: 16, fontWeight: FontWeight.w700)), const SizedBox(height: 4), const Text('user@example.com', style: TextStyle(fontSize: 14, color: Color(0xFF6B7280))), ], ), )
Dart
๋ณต์‚ฌ

์ƒ˜ํ”Œ 3: SwiftUI ๋ณ€ํ™˜

ํ”Œ๋Ÿฌ๊ทธ์ธ ์ถœ๋ ฅ

VStack(alignment: .leading, spacing: 16) { Image("avatar") .resizable() .frame(width: 48, height: 48) .clipShape(Circle()) VStack(alignment: .leading, spacing: 4) { Text("User Name") .font(.system(size: 16, weight: .bold)) .foregroundColor(Color(red: 0.07, green: 0.09, blue: 0.16)) Text("user@example.com") .font(.system(size: 14)) .foregroundColor(Color(red: 0.42, green: 0.45, blue: 0.50)) } } .padding(24) .background(Color.white) .cornerRadius(12)
Swift
๋ณต์‚ฌ

์ƒ˜ํ”Œ 4: AI ํ›„์ฒ˜๋ฆฌ โ€” Tailwind ๊ฒฐ๊ณผ๋ฅผ ์ปดํฌ๋„ŒํŠธํ™”

Copilot ํ”„๋กฌํ”„ํŠธ

๋‹ค์Œ Tailwind JSX๋ฅผ props ๋ฐ›๋Š” React ์ปดํฌ๋„ŒํŠธ๋กœ ๋ฆฌํŒฉํ† ๋งํ•ด์ค˜. - name, email, avatarUrl props - TypeScript ํƒ€์ž… ์ •์˜ - ๋””์ž์ธ ํ† ํฐ(@/design-system/tokens)์ด ์žˆ๋‹ค๋ฉด ๊ทธ๊ฒƒ ์‚ฌ์šฉ [Figma to Code ์ถœ๋ ฅ ์ฝ”๋“œ ๋ถ™์—ฌ๋„ฃ๊ธฐ]
Plain Text
๋ณต์‚ฌ

AI ์ถœ๋ ฅ

import type { FC } from 'react' type UserCardProps = { name: string email: string avatarUrl: string } export const UserCard: FC<UserCardProps> = ({ name, email, avatarUrl }) => ( <div className="inline-flex flex-col items-start gap-4 rounded-xl bg-white p-6"> <img src={avatarUrl} alt={name} className="h-12 w-12 rounded-full" /> <div className="flex flex-col gap-1"> <span className="text-base font-bold text-gray-900">{name}</span> <span className="text-sm text-gray-500">{email}</span> </div> </div> )
TypeScript
๋ณต์‚ฌ
โ†’ ๊ฒฐ์ •์  ๋ณ€ํ™˜(Figma to Code) + ์˜๋ฏธ ์ถ”๋ก (AI) ๊ฒฐํ•ฉ ํŒจํ„ด

์ƒ˜ํ”Œ 5: ๋””์ž์ธ ์‹œ์Šคํ…œ ํ† ํฐ ๋งคํ•‘ (์ˆ˜๋™)

ํ”Œ๋Ÿฌ๊ทธ์ธ ์ถœ๋ ฅ์˜ hex๋ฅผ ์ผ๊ด„ ์น˜ํ™˜:
๊ฒ€์ƒ‰: bg-[#2563EB] โ†’ ์น˜ํ™˜: bg-brand-500 ๊ฒ€์ƒ‰: text-[#111827] โ†’ ์น˜ํ™˜: text-text-primary ๊ฒ€์ƒ‰: text-[#6B7280] โ†’ ์น˜ํ™˜: text-text-secondary
Plain Text
๋ณต์‚ฌ
โ€ข
VS Code ๋ฉ€ํ‹ฐ์ปค์„œ / ์ •๊ทœ์‹ ์น˜ํ™˜ ํ™œ์šฉ
โ€ข
๋˜๋Š” Copilot์— "์ด ํŒŒ์ผ์˜ hex ์ƒ‰์ƒ์„ tailwind.config์˜ ํ† ํฐ๋ช…์œผ๋กœ ์น˜ํ™˜" ์š”์ฒญ