HTML से अपने ही Figma components
HTML से अपने ही Figma components: copies नहीं, instances
HTML को अपने ही Figma components के instances के रूप में import करें: cr-btn--primary जैसे class names सही variant और properties चुनते हैं, duplicate कुछ नहीं।
- मेल खाने वाले elements आपकी file या enabled libraries में पहले से मौजूद components के instances बनते हैं
- Class names variant और properties चुनते हैं: cr-btn--primary → Style=Primary
- मेल न मिले? Component एक बार बनता है और Components section में index होता है
- वही पेज दोबारा import करने पर कुछ नया नहीं बनता
EUREKA! · · 7 मिनट का लेख

आपके पास पहले से एक button component है। कोई पेज import करें और ज़्यादातर HTML-to-Figma tools आपको दूसरा थमा देते हैं: एक नया, अपने-आप बना button जो आपके जैसा दिखता है पर उससे जुड़ा नहीं है, और दिन के अंत में आपकी file में दो button sets होते हैं। HTML से अपने ही Figma components तक पहुँचने का मतलब इसका उल्टा होना चाहिए: पेज वही इस्तेमाल करे जो आपके पास पहले से है।
v1.1 से HTML to Frames में Components & hover states यही करता है। पेज का जो button या card आपकी Figma file के, या आपकी enable की हुई किसी library के, component से मेल खाता है, वह आपके component का instance बनता है, सही variant, component properties, text और image के साथ। सिर्फ़ वे elements नए components बनते हैं जो किसी से मेल नहीं खाते, और वह भी एक बार, ऐसी जगह जहाँ आप उन्हें ढूँढ सकें।
"अपने ही components इस्तेमाल करता है" का मतलब क्या है
- आपके components के instances. अगर पेज पर button है और आपकी file में
buttoncomponent set, तो पेज का हर button उसी set का instance बनकर आता है। आपका main component जैसा था वैसा रहता है। - सही variant. Class modifiers variant values चुनते हैं:
.cr-btn.cr-btn--primary.cr-btn--mबन जाता हैbutton,Style=Primary, Size=Mके साथ। - सही properties. Element के हिस्से component properties भरते हैं: title का text
Titletext property में जाता है, image के होने या न होने सेShow imageboolean बदलता है, badgeNewboolean को on कर देता है। - कुछ भी duplicate नहीं. जिन elements का आपकी file में कोई मेल नहीं, वे एक बार नया component बनते हैं, पेज के बगल में
Componentssection में रखे जाते हैं और नाम से index होते हैं। उसी पेज का अगला import उन्हें दोबारा इस्तेमाल करता है।
<a class="cr-btn cr-btn--primary cr-btn--m"> Get the plugin </a>
- cr-btn→button
- --primary→Style = Primary
- --m→Size = M
यह कैसे काम करता है
- Component-based HTML से शुरू करें. पेज के class names ही signal हैं। Block classes components का नाम बताती हैं, modifiers variant values का और element classes हिस्सों का; BEM-style markup (
block,block--modifier,block__element) आपको यही पहले से देता है। किसी component skill से AI के लिखे पेज, design-system documentation sites और हाथ से code किए गए marketing pages आम तौर पर बिना किसी बदलाव के qualify करते हैं। - Components चालू रखकर import करें. Components & hover states चालू होने पर plugin build करने से पहले आपकी file (सभी pages) और enabled libraries के components और component sets पढ़ता है।
- मिलान, फिर placement. पेज के हर block के लिए plugin उस नाम का component ढूँढता है, prefix हटाकर और aliases लगाकर (
cr-btn→btn→button)। छोटे किए हुए नाम भी मेल खाते हैं:rel-cardको Related Page Card नाम का component मिल जाता है। Variant पहले element के अपने modifiers से चुना जाता है, फिर उसके अंदर के modifiers से (rel-dot--serviceहिस्साType=Serviceset करता है)। Properties हिस्सों से भरती हैं:image-card__title→Title,__imageमौजूद या ग़ैर-मौजूद →Show image,badgeहिस्सा →New। जो modifiers किसी variant value का नाम नहीं लेते (--white,--ghost), वे दिखावट (fill, border और text color) से सबसे क़रीबी variant चुनते हैं, या sizes के लिए element की नापी गई size से, और result screen बताती है कि कौन से guess किए गए। - मेल नहीं: एक बार बनाएँ और index करें. जो block पेज पर कम से कम दो बार आता है और आपकी file में जिसका कोई जोड़ नहीं, वह नया component बनता है (एक
Variantproperty और उसके हिस्सों से text/boolean properties के साथ)। नए components import हुई screens के बाईं ओर एक हीComponentssection में जाते हैं, हर component का अपना sub-section, नाम से sorted। - दोबारा import: reuse. वही पेज, या उसी site का कोई और पेज, पिछली बार बने components को ढूँढ लेता है और instances रखता है। कुछ नया नहीं बनता।
उदाहरण: markup अंदर, variant बाहर
<a class="cr-btn cr-btn--primary cr-btn--m" href="/pricing/">Get the plugin</a>
<a class="cr-btn cr-btn--secondary cr-btn--s" href="/docs/">Read the docs</a>
<article class="image-card">
<img class="image-card__image" src="lidar.jpg" alt="">
<p class="image-card__eyebrow">Perception</p>
<h3 class="image-card__title">Odin 1 Lite</h3>
<p class="image-card__p">Wide-field LiDAR for mobile robots.</p>
</article>
| पेज पर | Figma में |
|---|---|
cr-btn cr-btn--primary cr-btn--m | button का instance, Style=Primary, Size=M, label "Get the plugin" |
cr-btn cr-btn--secondary cr-btn--s | button का instance, Style=Secondary, Size=S, label "Read the docs" |
image-card, __image, __eyebrow, __title, __p के साथ | image-card का instance, Show image=true, Subtitle, Title, Description भरे हुए, image copy की हुई |
हमारे tests में, उन component sets वाली एक Figma file पर, ऊपर जैसे सादे markup में लिखा 5 buttons, 4 related-page cards और 3 image cards वाला पेज 12 में से 12 instances बनकर आया, सही variants और values के साथ। cratustech.com के homepage पर 22 में से 22 buttons उस file के अपने button set के instances बने, और दूसरे import ने शून्य नए components बनाए।
बिना class names वाली sites के लिए explicit markup (advanced)
Utility classes (Tailwind वगैरह) से बने pages plugin को अनुमान लगाने के लिए कुछ नहीं देते। अगर HTML आपके हाथ में है, तो mapping खुद declare कर सकते हैं: element पर data-figma-component="Button", variant के लिए data-figma-variant="Style=Primary, Size=M", किसी child पर data-figma-prop="Label" (text content → text property; वरना उसकी visibility → boolean) और ऐसे boolean के लिए data-figma-bool="New" जो element के मौजूद होने पर on रहता है। आम मामलों के लिए सादे class names काफ़ी हैं; attributes तभी इस्तेमाल करें जब ज़रूरत हो।
यह अलग क्यों है
ज़्यादातर HTML-to-Figma tools components वहीं से बनाते हैं जो उन्हें पेज पर दिखता है। जिन public docs की हमने समीक्षा की (अक्टूबर 2026), उनमें html.to.design hover states से component variants बनाने का वर्णन करता है, और Figma का अपना Chrome extension capture किए गए colors को आपकी file के variables से bind करता है। उन docs में हमें इसका कोई वर्णन नहीं मिला कि import हुए पेज के elements user की file में पहले से मौजूद components के instances बनते हों।
HTML to Frames आपकी file को source of truth मानता है। पेज का button नया button नहीं बनता; वह आपका button बनता है, उसी variant में जो पेज ने माँगा। Colors और text के लिए Snap to my file's styles के साथ मिलाकर, import हुआ पेज पूरी तरह आपके design system के अंदर उतर सकता है।
| पेज से बने components | HTML to Frames | |
|---|---|---|
| आपकी file के set से मेल खाता button | आपके वाले के बगल में नया component | आपके set का instance, variant class names से चुना हुआ |
| Title, image, badge वाला card | नया component, copies पर overrides | हर card पर Title, Show image, New set किए हुए instance |
| बिना मेल वाला element | नया component | नया component, एक बार बना, Components section में index |
| पेज का दूसरा import | फिर से नए components | पहले बनाए हुए दोबारा इस्तेमाल; कुछ नया नहीं |
इसे कैसे इस्तेमाल करें
- वह Figma file खोलें जिसमें आपके components हैं, या वह library enable करें जिसमें वे हैं। Component और property के नाम पेज की class vocabulary से मेल खाने चाहिए (
button,Style,Size,Title…)। - HTML to Frames खोलें और एक source जोड़ें: Link, Local file, Paste code, Browser या MCP के ज़रिए कोई AI tool।
- Options में Components & hover states चालू रखें। Pro और Team पर यह default से चालू है।
- Import दबाएँ। Results screen "Declared components" के नीचे बताती है कि क्या link हुआ, क्या बना, क्या guess हुआ और क्या बिना मेल रहा।
- Import हुए frame पर कोई भी button select करें: दाईं panel में आपका component उसके variant और properties के साथ दिखता है, switch करने के लिए तैयार।

Components & hover states, Pro और Team feature है। Launch पर Pro $7/माह है और Figma के अंदर ही ख़रीदा जाता है।
यह सबसे ज़्यादा कब काम आता है
- AI के लिखे pages. Claude या Cursor से अपनी component skill के हिसाब से पेज लिखवाएँ, उसे MCP पर भेजें, और वह आपके असली components से बना हुआ पहुँचता है। Prompt से on-system design तक का loop बिना किसी cleanup pass के पूरा हो जाता है।
- Design-system teams जो किसी coded site को library से मिलाकर जाँच रही हैं: हर matched instance साबित करता है कि code और design एक राय हैं; result screen की हर "guessed" या "unknown" entry किसी drift की ओर इशारा करती है।
- Client library वाली agencies जो client की live site import कर रही हैं: pages client के अपने components पर आते हैं, इसलिए proposals सही file से शुरू होते हैं।
- Developers जो design system CSS में रखते हैं: आपके localhost pages के Figma में instances बनकर उतरने के लिए BEM class names काफ़ी हैं।
जानने लायक बातें
- मिलान class names पढ़ता है. सिर्फ़ utility classes, hashed CSS-module names या बिना मतलब की classes वाली sites पर मेल नहीं बनते; उन्हें पहले की तरह दोहराए गए structures से components मिलते हैं, या आप
data-figma-*attributes जोड़ते हैं। - नाम मायने रखते हैं. Variant values modifier names से आती हैं (
--primary→Primary); property के नाम हिस्सों के नामों और synonyms की एक छोटी list से (p/desc→Description,badge→New,image/img→Show image,eyebrow/kicker→Subtitle)। - आपका set कभी edit नहीं होता. अगर पेज ऐसा variant माँगे जो आपके set में नहीं है, तो सबसे क़रीबी variant इस्तेमाल होता है और report किया जाता है; plugin missing variants सिर्फ़ उन्हीं sets में जोड़ता है जो उसने खुद बनाए हैं।
- Sizes. Instance component की अपनी size रखता है। वह अपनी row तभी भरता है जब पेज का element साफ़ तौर पर ज़्यादा चौड़ा हो (full-width button), और उसे कभी छोटा नहीं किया जाता।
- Text. Matched text property होने पर पेज का text instance पर set होता है। आपका ऐसा component जिसमें कोई एक text property न हो, अपना default text रखता है।
- छिपे हिस्से. जो हिस्सा component में है पर पेज पर नहीं (जैसे badge), वह instance पर hide हो जाता है; बिना Auto Layout वाले main component में उसकी जगह खाली रह जाती है।
- Components & hover states, Pro और Team feature है, और file की libraries search होने के लिए enabled होनी चाहिए।
और देखें
- Hover variants के साथ website to Figma components
- Website colors को उन Figma styles से map करें जो आपके पास पहले से हैं
- AI से बना UI, MCP के ज़रिए Figma में
- CSS variables से Figma variables
- HTML to Frames की विकल्पों से तुलना
Plugin लें, अपने components वाली file खोलें और उन पर बना कोई पेज import करें: जो buttons उतरते हैं, वे आपके ही हैं।
अक्सर पूछे जाने वाले सवाल
- क्या HTML को मेरे मौजूदा components के instances के रूप में Figma में import किया जा सकता है?
- हाँ। Components & hover states चालू होने पर HTML to Frames आपकी file और enabled libraries में components और component sets ढूँढता है। जिस पेज element के class names उनमें से किसी से मेल खाते हैं, उसे उस component के instance के रूप में रखा जाता है, variant और properties class names से चुने जाते हैं, और उसका text और image copy हो जाते हैं।
- Plugin को कैसे पता चलता है कि कौन सा variant इस्तेमाल करना है?
- Element के class modifiers से। cr-btn--primary जैसी class Style=Primary set करती है और cr-btn--m Size=M; अंदर के हिस्सों के modifiers भी गिने जाते हैं। जो modifier किसी variant value का नाम नहीं लेता, वह fill, border और text color से, या नापी गई size से, सबसे क़रीबी variant चुनता है, और result screen बताती है कि कौन से guess किए गए।
- अगर पेज पर कोई ऐसा component है जो मेरी file में नहीं है तो क्या होता है?
- वह एक बार नए component के रूप में बनता है, एक Variant property और उसके हिस्सों से ली गई text या boolean properties के साथ, और import हुई screens के बाईं ओर एक Components section में नाम से sorted रखा जाता है। वही पेज दोबारा import करने पर वह component मिल जाता है और दूसरा बनाने की जगह instances रखे जाते हैं।
- क्या यह किसी भी website पर काम करता है?
- यह उन pages पर काम करता है जिनके class names का मतलब होता है, जैसे BEM-style markup, design-system documentation sites और किसी component skill से AI के लिखे पेज। जो sites सिर्फ़ utility classes या hashed class names इस्तेमाल करती हैं, वे मिलान के लिए कुछ नहीं देतीं, इसलिए उन्हें पहले की तरह दोहराए गए structures से components मिलते हैं, या HTML आपके हाथ में हो तो आप data-figma-component attributes जोड़ सकते हैं।
- क्या import मेरे main components बदल देगा?
- नहीं। आपके main components और component sets सिर्फ़ पढ़े जाते हैं, कभी edit नहीं होते। अगर माँगा गया variant आपके set में नहीं है, तो सबसे क़रीबी मौजूद variant इस्तेमाल होता है और results screen पर report किया जाता है। Missing variants सिर्फ़ उन component sets में जोड़े जाते हैं जो plugin ने खुद बनाए हैं।
Web pages को दोबारा हाथ से बनाना अब बंद।
Link paste कीजिए और कुछ ही सेकंड में असली, editable, responsive Figma layers पाइए। शुरुआत मुफ़्त है — हर महीने 10 imports।


