📐 1. Sizing Modes۱. Sizing Modes — اندازه‌گذاری

Figma offers three dimension modes for width and height. Each maps to a different CSS pattern.

فیگما سه حالت برای عرض و ارتفاع دارد. هر کدام به یک الگوی CSS متفاوت تبدیل می‌شوند.

Figma CSS Vuetify 3 Noteنکته
Fixed width: 120px style="width: 120px" Explicit pixel valueمقدار ثابت
Fill flex: 1 1 0 or width: 100% class="flex-grow-1" or class="w-100" Use flex: 1 in flex containersدر flex container از flex: 1 استفاده کنید
Hug width: fit-content Omit width — defaultحذف width — رفتار پیش‌فرض Wraps its contentبه اندازه محتوا
Min Width min-width: {n}px style="min-width: {n}px"
Max Width max-width: {n}px style="max-width: {n}px"
⚠️
Fill in code: if the parent is a flex container, use flex: 1. If the parent is a block element, use width: 100%. These produce different results. Fill در کد: اگر parent یک flex container است از flex: 1 استفاده کنید. اگر block است از width: 100%. این دو رفتار متفاوت دارند.

2. Auto Layout۲. Auto Layout — چیدمان خودکار

Auto Layout in Figma is Flexbox in CSS. Direction, gap, padding, and alignment map 1-to-1.

Auto Layout در فیگما معادل Flexbox در CSS است. direction، gap، padding و alignment به صورت مستقیم ترجمه می‌شوند.

Direction & WrapDirection و Wrap flex-direction

FigmaCSSVuetify 3
Horizontaldisplay:flex; flex-direction:rowclass="d-flex flex-row"
Verticaldisplay:flex; flex-direction:columnclass="d-flex flex-column"
Wrapflex-wrap: wrapclass="flex-wrap"
No Wrapflex-wrap: nowrapclass="flex-nowrap"

Gap gap

FigmaCSSVuetify 3
Gap (all)gap: {n}pxclass="ga-{n}"
Horizontal gapcolumn-gap: {n}pxclass="ga-x-{n}"
Vertical gaprow-gap: {n}pxclass="ga-y-{n}"
Space Betweenjustify-content: space-betweenclass="justify-space-between"
Space Aroundjustify-content: space-aroundclass="justify-space-around"

Padding padding

FigmaCSSVuetify 3
All sidesهمه طرفpadding: {n}pxclass="pa-{n}"
H (L+R)padding-inline: {n}pxclass="px-{n}"
V (T+B)padding-block: {n}pxclass="py-{n}"
Toppadding-top: {n}pxclass="pt-{n}"
Rightpadding-right: {n}pxclass="pr-{n}"
Bottompadding-bottom: {n}pxclass="pb-{n}"
Leftpadding-left: {n}pxclass="pl-{n}"

Alignment — Primary AxisAlignment — محور اصلی justify-content

FigmaCSSVuetify 3
Startjustify-content: flex-startclass="justify-start"
Centerjustify-content: centerclass="justify-center"
Endjustify-content: flex-endclass="justify-end"
Space Betweenjustify-content: space-betweenclass="justify-space-between"

Alignment — Cross AxisAlignment — محور عرضی align-items

FigmaCSSVuetify 3
Top / Startalign-items: flex-startclass="align-start"
Centeralign-items: centerclass="align-center"
Bottom / Endalign-items: flex-endclass="align-end"
Baselinealign-items: baselineclass="align-baseline"
Stretchalign-items: stretchclass="align-stretch"

Absolute Position inside Auto LayoutAbsolute Position درون Auto Layout

Vue
<!-- Figma: Auto Layout parent + child with "Absolute position" --><!-- فیگما: parent با Auto Layout + فرزند Absolute -->
<div class="position-relative d-flex flex-column ga-4">
  <div>item 1</div>
  <div>item 2</div>
  <!-- absolute child --><!-- فرزند absolute -->
  <div class="position-absolute" style="top:8px;right:8px">badge</div>
</div>

3. Grid Layout۳. Grid Layout — شبکه ستونی

Vue
<!-- Mobile: 12col | Tablet: 6col | Desktop: 4col --><!-- موبایل: کامل | تبلت: نصف | دسکتاپ: یک‌سوم -->
<v-container>
  <v-row>
    <v-col cols="12" sm="6" md="4">content</v-col>
  </v-row>
</v-container>

<v-row no-gutters>  <!-- no gutter --><!-- بدون gutter -->
<v-row class="ga-4">    <!-- custom gap --><!-- gap سفارشی -->

4. Stroke → Border۴. Stroke → Border

Figma strokes have three positions, each with a different CSS approach.

Stroke در فیگما سه position دارد که هر کدام رویکرد CSS متفاوتی دارند.

Stroke Positionموقعیت Stroke

FigmaCSSNoteنکته
Inside border: 2px solid #color;
box-sizing: border-box
Element size unchangedاندازه element تغییر نمی‌کند
Outside outline: 2px solid #color;
outline-offset: 0
Outside layout flowخارج از layout
Center box-shadow: 0 0 0 1px #color Approximation onlyتقریب — دقیق نیست
⚠️
Center stroke has no direct CSS equivalent. box-shadow is the closest approximation but does not perfectly replicate rounded corners. Center stroke معادل مستقیم در CSS ندارد. box-shadow نزدیک‌ترین تقریب است اما گوشه‌های گرد را دقیق نمی‌گیرد.

Stroke Styleاستایل Stroke

FigmaCSS
Solidborder-style: solid
Dashedborder-style: dashed
Dottedborder-style: dotted

Per-Side StrokeStroke تک‌ضلعی

FigmaCSS
Top onlyborder-top: 1px solid #color
Right onlyborder-right: 1px solid #color
Bottom onlyborder-bottom: 1px solid #color
Left onlyborder-left: 1px solid #color

5. Border Radius۵. Border Radius — گوشه‌های گرد

Vuetify 3 provides a predefined rounded scale. All Figma border-radius values should map to one of these.

Vuetify 3 یک مقیاس از پیش تعریف‌شده دارد. تمام مقادیر border-radius فیگما باید به یکی از این‌ها تبدیل شوند.

rounded-0
0px
rounded-sm
2px
rounded
4px
rounded-md
6px
rounded-lg
8px
rounded-xl
12px
rounded-pill
9999px
rounded-circle
50%
💡
Corner Smoothing (Figma's Apple-style curves) has no CSS equivalent. Use standard border-radius. For pixel-perfect shapes, use an SVG path. Corner Smoothing فیگما (منحنی‌های سبک اپل) معادل CSS ندارد. از border-radius معمولی استفاده کنید. برای دقت بالاتر از SVG path بهره بگیرید.

🎨 6. Fill → Background / Color۶. Fill → Background / Color

Solid Fillرنگ solid

FigmaCSSVuetify 3
Solid fillرنگ solidbackground-color: #HEXclass="bg-{token}"
No fillbackground: transparent
Text colorرنگ متنcolor: #HEXclass="text-{token}"

Gradient FillGradient

📐
Angle conversion: Figma measures from 12 o'clock (top), CSS from 3 o'clock (right).
Formula: css_angle = (figma_angle + 90) % 360
تبدیل زاویه: فیگما از ۱۲ ساعت می‌چرخد، CSS از ۳ ساعت.
فرمول: css_angle = (figma_angle + 90) % 360
Figma Angleزاویه فیگماCSS deg
(top → bottom)(بالا → پایین)180deg
90° (left → right)(چپ → راست)90deg
180° (bottom → top)(پایین → بالا)0deg
270° (right → left)(راست → چپ)270deg

Image FillImage Fill

Figma Modeحالت فیگماCSSVue
Fill (Cover)background:url() center/cover no-repeat<v-img cover>
Fit (Contain)background:url() center/contain no-repeat<v-img contain>
Cropobject-fit:none; object-position:x yobject-position prop
Tilebackground:url() repeat

7. Effects → Shadow۷. Effects → سایه و افکت

Drop Shadow → box-shadow

CSS
/* Figma: X=0, Y=4, Blur=8, Spread=0, #000 at 20% *//* فیگما: X=0, Y=4, Blur=8, Spread=0, #000 با ۲۰% شفافیت */
box-shadow: 0px 4px 8px 0px rgba(0, 0, 0, 0.20);

/* Inner Shadow *//* سایه داخلی */
box-shadow: inset 0px 2px 4px 0px rgba(0, 0, 0, 0.15);

/* Multiple shadows *//* چند سایه */
box-shadow:
  0px 2px 4px rgba(0,0,0,0.10),
  0px 8px 16px rgba(0,0,0,0.08);

Vuetify Elevation Scaleمقیاس Elevation در Vuetify

e-0flatتخت
e-2cardcard
e-4raisedبالا
e-8menumenu
e-16dialogdialog
e-24drawerdrawer
ClassTypical Useکاربرد معمول
elevation-0Flat — no shadowبدون سایه
elevation-2Default cardcard پیش‌فرض
elevation-4Raised cardcard برجسته
elevation-8Menu, tooltipmenu، tooltip
elevation-16Modal, dialogmodal، dialog
elevation-24Navigation drawerNavigation drawer

Other Effectsافکت‌های دیگر

FigmaCSS
Layer Blurfilter: blur(8px)
Background Blurbackdrop-filter: blur(12px)

8. Opacity۸. Opacity — شفافیت

FigmaCSSNoteنکته
Layer Opacity 50%opacity: 0.5All children affectedهمه فرزندان تحت تاثیر
Fill opacityrgba(r, g, b, 0.5)Only the colorفقط رنگ
Disabled (38%)opacity: 0.38Material Design specاستاندارد Material
⚠️
Key difference: opacity on a layer affects all its children. For background-only transparency, use rgba() or rgb(var(--v-theme-primary), 0.1). تفاوت مهم: opacity روی لایه همه فرزندان را شفاف می‌کند. برای شفافیت فقط پس‌زمینه از rgba() یا rgb(var(--v-theme-primary), 0.1) استفاده کنید.

9. Blend Modes۹. Blend Modes

Figmamix-blend-modeFigmamix-blend-mode
NormalnormalOverlayoverlay
DarkendarkenSoft Lightsoft-light
MultiplymultiplyHard Lighthard-light
Color Burncolor-burnDifferencedifference
LightenlightenExclusionexclusion
ScreenscreenHuehue
Color Dodgecolor-dodgeSaturationsaturation
Plus Lighterplus-lighterLuminosityluminosity

Aa 10. Typography۱۰. Typography — تایپوگرافی

Propertiesویژگی‌ها

FigmaCSSVuetify 3
Font Familyfont-family: 'Name'Set in vuetify.js themeتنظیم در vuetify.js
Font Sizefont-size: 16pxUse type scale belowاز جدول type scale استفاده کنید
Font Weightfont-weight: 500class="font-weight-medium"
Italicfont-style: italicclass="font-italic"
Line Height (px)line-height: 24pxstyle="line-height: 24px"
Letter Spacingletter-spacing: 0.05emstyle="letter-spacing:0.05em"
Align Lefttext-align: leftclass="text-left"
Align Centertext-align: centerclass="text-center"
Align Righttext-align: rightclass="text-right"
Uppercasetext-transform: uppercaseclass="text-uppercase"
Underlinetext-decoration: underline
Strikethroughtext-decoration: line-through
Paragraph Spacingفاصله پاراگرافmargin-bottom: 16pxclass="mb-4"
Truncateoverflow:hidden; text-overflow:ellipsis; white-space:nowrapclass="text-truncate"

Vuetify 3 Type Scaleمقیاس تایپ Vuetify 3

Class
Size / Weight
Sampleنمونه
text-h1
96px · 300
H1
text-h2
60px · 300
H2
text-h3
48px · 400
H3
text-h4
34px · 400
H4
text-h5
24px · 400
H5
text-h6
20px · 500
H6
text-subtitle-1
16px · 400
Subtitle 1
text-subtitle-2
14px · 500
Subtitle 2
text-body-1
16px · 400
Body 1 — main textمتن اصلی
text-body-2
14px · 400
Body 2 — secondaryمتن ثانویه
text-button
14px · 500
BUTTON
text-caption
12px · 400
Caption
text-overline
10px · 400
OVERLINE

11. Spacing System۱۱. Spacing System — سیستم فاصله

Vuetify uses 4px as the base unit. All Figma spacing values must be multiples of 4.

Vuetify از 4px به عنوان واحد پایه استفاده می‌کند. تمام فاصله‌های فیگما باید مضرب ۴ باشند.

n=0
0px
n=1
4px
n=2
8px
n=3
12px
n=4
16px
n=5
20px
n=6
24px
n=8
32px
n=10
40px
n=12
48px
n=16
64px
Cheatsheet
/* margin *//* margin */
ma-{n}  mx-{n}  my-{n}  mt-{n}  mr-{n}  mb-{n}  ml-{n}
/* padding *//* padding */
pa-{n}  px-{n}  py-{n}  pt-{n}  pr-{n}  pb-{n}  pl-{n}
/* gap *//* gap */
ga-{n}  ga-x-{n}  ga-y-{n}
/* center a block *//* وسط‌چین block */
mx-auto

12. Constraints → Positioning۱۲. Constraints → Positioning

Constraints apply only inside non-Auto-Layout frames. Inside Auto Layout, use flexbox alignment instead.

Constraints فقط در Frame‌های non-Auto-Layout معنی دارند. درون Auto Layout از flexbox alignment استفاده کنید.

FigmaCSS
Leftposition: absolute; left: {n}px
Rightposition: absolute; right: {n}px
Topposition: absolute; top: {n}px
Bottomposition: absolute; bottom: {n}px
Left & Right (stretch)position: absolute; left: {n}px; right: {n}px
Top & Bottom (stretch)position: absolute; top: {n}px; bottom: {n}px
Center Hposition:absolute; left:50%; transform:translateX(-50%)
Center Vposition:absolute; top:50%; transform:translateY(-50%)
Center H+Vposition:absolute; top:50%; left:50%; transform:translate(-50%,-50%)

13. Component Structure۱۳. ساختار کامپوننت

FigmaVue / Vuetify
Frame<div>, <v-sheet>, <v-card>
Group<div> (no semantic meaning)(بدون معنای semantic)
Section<section>
Component (main)Vue SFC — <script setup>
Instance<MyComponent />
Variantprops: { variant: 'filled' | 'outlined' }
Boolean Propertyv-if / v-show
Text PropertyVue prop or slotprop یا slot
Instance Swap<component :is="comp" />

14. Component States۱۴. Component States

Default
Hover
Pressed
Focused
Disabled
Error
Figma StateState فیگماCSSVue / Vuetify
Default
Hover:hover@mouseenter / @mouseleave
Pressed:active@mousedown
Focused:focus, :focus-visible@focus / @blur
Disabled:disabled + opacity: 0.38:disabled="true"
Error.v-input--error:error="true"
Loading:loading="true"
Selected.selectedv-model / :model-value

📱 15. Responsive / Breakpoints۱۵. Responsive / Breakpoints

Figma Frameفریم فیگماVuetifyRange
Mobile (360px)xs< 600px
Tablet (768px)sm600–959px
Laptop (1280px)md960–1279px
Desktop (1440px)lg1280–1919px
Wide (1920px)xl1920–2559px
Ultra-widexxl≥ 2560px
Vue
<!-- Mobile only --><!-- فقط موبایل -->
<div class="d-flex d-sm-none">

<!-- Hidden on mobile --><!-- پنهان در موبایل -->
<div class="d-none d-sm-flex">

<!-- Responsive columns --><!-- ستون responsive -->
<v-col cols="12" sm="6" md="4">

16. Clip Content & Z-index۱۶. Clip و Z-index

Clip Content

FigmaCSS
Clip content ✓overflow: hidden
Clip content ✗overflow: visible
Scroll insideاسکرول داخلیoverflow: auto
Clip with shapeکلیپ با شکلclip-path: polygon(...)

Z-index

ContextکاربردVuetify z-index
Baseپایه0
Tooltip / Menu2000
Overlay backdrop2300
Dialog / Modal2400
App Bar1004
Snackbar2500

🖼 17. Images & Icons۱۷. تصویر و آیکون

Vue
<!-- Cover (Figma: Fill) --><!-- کاور (فیگما: Fill) -->
<v-img :src="url" cover :aspect-ratio="16/9" />

<!-- Contain (Figma: Fit) --><!-- Contain (فیگما: Fit) -->
<v-img :src="url" contain />

<!-- With placeholder --><!-- با placeholder -->
<v-img :src="url" cover>
  <template #placeholder>
    <v-skeleton-loader type="image" />
  </template>
</v-img>

<!-- Icon — always MDI --><!-- آیکون — همیشه MDI -->
<v-icon size="24" color="primary">mdi-check-circle</v-icon>

18. Color System۱۸. سیستم رنگ

TokenUsageکاربردVue
primaryBrand main colorرنگ اصلی برندcolor="primary"
secondarySupporting colorرنگ مکملcolor="secondary"
errorError stateخطاcolor="error"
warningWarning stateهشدارcolor="warning"
infoInformationalاطلاعاتcolor="info"
successSuccess stateموفقیتcolor="success"
surfaceCard backgroundپس‌زمینه cardclass="bg-surface"
CSS Variables
/* Theme color with opacity *//* رنگ theme با opacity */
background: rgb(var(--v-theme-primary), 0.1);
color: rgb(var(--v-theme-on-surface));

19. Special Cases & Common Pitfalls۱۹. موارد خاص و دام‌های رایج

Fill width inside Auto LayoutFill width درون Auto Layout

Vue
<div class="d-flex flex-row">
  <div style="width:48px">icon</div>
  <div class="flex-grow-1">  <!-- Fill --><!-- Fill -->
    content
  </div>
</div>

Nested Auto Layout — most common patternNested Auto Layout — رایج‌ترین الگو

Vue

  Figma:
  outer (Vertical, gap=16, padding=24)
    └─ inner (Horizontal, gap=8, align=center)
         ├─ icon (Fixed 24×24)
         └─ label (Fill)

<div class="d-flex flex-column ga-4 pa-6">
  <div class="d-flex flex-row ga-2 align-center">
    <v-icon size="24">mdi-check</v-icon>
    <span class="flex-grow-1">label</span>
  </div>
</div>

Gradient angle conversionتبدیل زاویه gradient

Formula
css_angle = (figma_angle + 90) % 360

Figma    → CSS 180deg  (top → bottom)(بالا → پایین)
Figma 90°  → CSS 90deg   (left → right)(چپ → راست)
Figma 180° → CSS 0deg    (bottom → top)(پایین → بالا)
Figma 270° → CSS 270deg  (right → left)(راست → چپ)

Image aspect ratioنسبت تصویر

Vue
<v-img :src="url" :aspect-ratio="16/9" cover />

<!-- Or CSS --><!-- یا CSS -->
<div style="aspect-ratio:16/9; overflow:hidden">
  <img style="width:100%;height:100%;object-fit:cover">
</div>

Handoff Checklistچک‌لیست Handoff

Before sending a design to the Tech team, verify all items below.

قبل از ارسال طراحی به تیم Tech، همه موارد زیر را بررسی کنید.

  • All spacing values are multiples of 4pxتمام فاصله‌ها مضرب ۴px هستند
  • Font sizes match the Vuetify type scaleاندازه‌های فونت با Vuetify type scale تطابق دارند
  • Colors reference design tokens — not raw hex valuesرنگ‌ها به design token اشاره می‌کنند، نه hex مستقیم
  • Auto Layout direction (H/V) and gap are clearly annotateddirection و gap در Auto Layout مشخص شده‌اند
  • Padding is explicitly set on every framePadding روی هر فریم به صراحت تنظیم شده
  • Responsive frames exist (mobile / tablet / desktop)فریم‌های responsive وجود دارند (موبایل / تبلت / دسکتاپ)
  • All states are designed: hover / disabled / error / loadingهمه states طراحی شده‌اند: hover / disabled / error / loading
  • Stroke position is specified: inside / outside / centerموقعیت Stroke مشخص است: inside / outside / center
  • Image fill mode is specified: cover / contain / cropحالت image fill مشخص است: cover / contain / crop
  • Component variants map to Vue propsVariant‌های کامپوننت به Vue props تبدیل شده‌اند
  • Icons are from MDI or their names are specifiedآیکون‌ها از MDI هستند یا نامشان مشخص شده
  • Border radius values match Vuetify scaleمقادیر border-radius با مقیاس Vuetify تطابق دارند
  • Elevation matches Vuetify scale (0/2/4/8/12/16/24)Elevation با مقیاس Vuetify تطابق دارد
  • Clip content is set on frames with overflowClip content روی فریم‌های overflow تنظیم شده