MeDo

AI बटन जेनरेटर।

अपना ब्रांड बताएं और MeDo पूरा बटन सिस्टम जेनरेट करता है — primary, secondary, ghost और destructive वेरिएंट, तीन साइज़, साथ में hover, focus, loading और disabled स्टेट्स। एक प्रॉम्प्ट, एक सुसंगत सेट।

Button
Button

बटन हर डिज़ाइन सिस्टम का लगभग एक-चौथाई हिस्सा होते हैं

कोई भी कम्पोनेंट इससे ज़्यादा उपयोग नहीं होता। हर फॉर्म सबमिशन, हर CTA, हर कन्फर्मेशन डायलॉग बटन से गुज़रता है — और इसीलिए यहां की असंगति सबसे साफ़ दिखती है। किसी प्रोडक्ट में दस थोड़े-थोड़े अलग बटन तब तक ही "लापरवाह" लगने लगते हैं जब कोई कारण बता भी नहीं पाता। एक ही विवरण से पूरा सेट एक बार में जेनरेट करने पर वेरिएंट स्पेसिंग स्केल, radius और focus ट्रीटमेंट अनुशासन से नहीं, बल्कि संरचना से साझा करते हैं।

6 टेम्पलेट

Button टेम्पलेट जो आप जेनरेट कर सकते हैं

हर टेम्पलेट एक असली प्रॉम्प्ट है, स्क्रीनशॉट नहीं। इसे किसी भी AI एडिटर में कॉपी करें, या MeDo में चलाकर React + Tailwind कोड सीधे पाएं।

BasicVariant Set

Four Roles, Three Sizes

The set you generate first and edit for a year. Roles rather than colors, so a rebrand moves one token instead of forty class strings.

Create a reusable button component with four role-based variants: primary as a solid brand fill with white text, secondary as a white surface with a grey border, ghost as transparent with a tinted background on hover, and destructive as a solid red. Support sm at 32px tall, md at 40px and lg at 48px, plus a fullWidth prop. Wire hover, active, focus-visible, disabled and loading states for every variant, keeping the focus ring on focus-visible only so mouse clicks do not draw it. Render a real button element with an explicit type attribute, and drive all four variants from one shared spacing and radius scale rather than per-variant values.

MeDo में आज़माएं
IconsIcon + Label

Leading and Trailing Icon Slots

Two slots, one gap token. Most icon bugs are spacing bugs — an icon glued to its label, or optically misaligned because the SVG box is taller than the cap height.

Extend a button component with optional leading and trailing icon slots. Size the icon to 16px at sm and md and 18px at lg, set a consistent 8px gap between icon and label, and add aria-hidden="true" to the icon so screen readers announce the label only. Flip the slot order automatically under a right-to-left direction. Use inline-flex with items-center so the icon aligns to the label cap height rather than the line box, and give the SVG shrink-0 so a long wrapping label cannot squash it. Accept any React node so a spinner or an avatar can occupy the same slot.

MeDo में आज़माएं
LoadingAsync Submit

Loading Button With a Locked Width

A submit button that shrinks when the spinner replaces the label makes the whole form jump. Reserve the width and the click feels instant instead of broken.

Create a submit button with a loading prop. While loading, replace the label with a centered spinner but keep the button at its resting width by rendering the label at zero opacity underneath the spinner rather than removing it from the DOM. Set aria-busy="true" and aria-disabled="true", block repeat submissions, and keep the button focusable so a screen reader can still read the pending state. Respect prefers-reduced-motion by swapping the rotating spinner for a static pulsing dot. Add an optional loadingText prop that announces progress through a polite live region instead of changing the visible label.

MeDo में आज़माएं
ToolbarIcon Only

Square Icon Button With a Tooltip

Dense toolbars need it, and it fails accessibility more often than any other button. No visible text means the accessible name has to come from somewhere explicit.

Create an icon-only button for a dense toolbar: a square target at 32px, 36px and 40px with the icon centered and no label. Require an ariaLabel prop and render it as aria-label on the button, since there is no visible text to name the control. Expand the hit area to at least 44px with a negative-margin pseudo-element so touch targets meet the minimum without widening the toolbar. Pair it with a tooltip that appears on hover and on keyboard focus, referenced with aria-describedby so the tooltip supplements the label rather than replacing it. Include a pressed state driven by aria-pressed for toggle uses.

MeDo में आज़माएं
GroupSplit Action

Split Button With a Menu Half

One default action plus a menu of alternates — Save and Save as, Deploy and Deploy to staging. Two buttons that must look like one and stay independently reachable.

Create a split button: a primary action on the left and a narrow chevron trigger on the right, joined into one visual unit with a 1px divider, the outer corners rounded and the inner corners square. Render them as two separate button elements so each keeps its own accessible name, giving the chevron a label such as "More save options". Wire the chevron to a menu with aria-haspopup="menu" and aria-expanded, opening on click and on ArrowDown, closing on Escape with focus returned to the trigger. Keep the focus ring visible on each half by drawing it outside the shared border rather than inside it.

MeDo में आज़माएं
PolymorphicLink as Button

Anchor With Button Styling

A styled div with an onClick is not a button and a button that navigates is not a link. One asChild prop keeps the styling while the correct element still ships.

Create a polymorphic button that accepts an asChild prop and forwards its variant, size and state classes onto a child element, so a Next.js Link or a plain anchor can carry button styling without nesting an interactive element inside a button. Forward the ref, merge className rather than overwriting it, and skip the type attribute when the rendered element is not a button. When the target is an anchor, omit the disabled attribute — which anchors ignore — and instead drop href and set aria-disabled with pointer-events none. Add an external variant that appends rel="noopener noreferrer" and a visually hidden "opens in a new tab" note.

MeDo में आज़माएं

अपने Button को कैसे कस्टमाइज़ करें

वेरिएंट तय करें, सिर्फ रंग नहीं

रंग के आधार पर नहीं, भूमिका के आधार पर वेरिएंट मांगें — primary, secondary, ghost, destructive। भूमिका-आधारित नामकरण रीब्रांड झेल लेता है: ब्रांड कलर बदले तो भी "primary" का मतलब वही रहता है और सिर्फ एक टोकन बदलना पड़ता है।

loading स्टेट स्पष्ट रूप से बताएं

कहें कि स्पिनर लेबल की जगह ले लेकिन बटन की चौड़ाई बनी रहे। वरना सबमिट के बीच बटन सिकुड़ते हैं और आसपास का लेआउट उछलता है — जेनरेट की गई UI में सबसे आम फिनिशिंग बग।

focus नहीं, focus-visible मांगें

:focus पर ring माउस क्लिक पर भी दिखती है और बग जैसी लगती है। :focus-visible मांगें ताकि ring केवल कीबोर्ड और असिस्टिव-टेक यूज़र्स को दिखे — एक्सेसिबिलिटी ऑडिट असल में यही जांचते हैं।

disabled की सेमांटिक्स तय करें

तय करें कि disabled बटन disabled एट्रिब्यूट उपयोग करें या aria-disabled। एट्रिब्यूट focus सहित सभी इवेंट रोक देता है; aria-disabled बटन को focusable रखता है ताकि स्क्रीन रीडर बता सके कि यह क्यों उपलब्ध नहीं है। बताएं आपको कौन सा चाहिए।

Button कंपोनेंट का उपयोग कौन करता है

SaaS प्रोडक्ट

ट्रायल CTA के लिए primary बटन, "डेमो बुक करें" के लिए secondary, कार्ड के अंदर तीसरे स्तर के लिंक के लिए ghost, और अकाउंट डिलीट के लिए destructive — सभी एक ही radius और focus ring साझा करते हैं ताकि इंटरफ़ेस एक ही प्रोडक्ट जैसा लगे।

ई-कॉमर्स स्टोर

इन्वेंटरी जांच के दौरान loading स्टेट दिखाने वाला हाई-कॉन्ट्रास्ट "कार्ट में जोड़ें" बटन, और उसके साथ शांत "बाद के लिए सेव करें" secondary वेरिएंट जो ध्यान के लिए मुकाबला नहीं करता।

डैशबोर्ड या एडमिन टूल

घनी टूलबार में स्टैंडर्ड साइज़ के एक्शन बटन के साथ छोटे, केवल-आइकन बटन चाहिए होते हैं जिनके एक्सेसिबल लेबल हों। sm से lg तक की एक साइज़ स्केल टूलबार को कसा हुआ रखती है, बिना एक-बार-के स्टाइल बनाए।

मार्केटिंग लैंडिंग पेज

फोल्ड के ऊपर एक बड़ा primary बटन, पेज के अंत में दोहराया गया, और "यह कैसे काम करता है" वाले सेकेंडरी लिंक के लिए ghost वेरिएंट जो कन्वर्ट नहीं, स्क्रॉल कराता है।

अलग-अलग वेबसाइटों के लिए Button पैटर्न

वही button कंपोनेंट, उस वेबसाइट के प्रकार के हिसाब से ढाला गया जहाँ वह लगेगा।

01 / 06

SaaS Product Buttons

One primary per screen is the rule that keeps a product feeling directed. Everything else drops to secondary or ghost, and destructive stays reserved for irreversible actions so a red button always means the same thing. The moment two primaries appear in one view, users start reading the layout instead of acting on it.

Button की शैलियाँ और वेरिएंट

जो वेरिएंट बाकी पेज से मेल खाता है उसे चुनें और जेनरेट करें।

01 / 06

Solid Button

A filled surface with white or near-white text, carrying the highest visual weight on the page. Check the contrast against the fill rather than the page background, and remember that a lightened hover state can quietly drop a passing 4.5:1 pairing below the line.

React, Next.js, Vue और Svelte में Button

React, Next.js, Vue 3, SvelteKit, Astro या सादा HTML — वही button, जोड़ने के छह तरीके।

01 / 06

React Button

Derive the class string from variant and size lookups instead of chained ternaries, and forward the ref so tooltips and popovers can anchor to the element. Spread the remaining props last so a caller can still pass type or aria attributes through.

src/components/Button.tsx

export const Button = forwardRef(function Button(
  { variant = 'primary', size = 'md', loading, ...props },
  ref
) {
  return (
    <button
      ref={ref}
      type="button"
      aria-busy={loading}
      className={cn(base, variants[variant], sizes[size])}
      {...props}
    />
  )
})

अपने Button को प्रोजेक्ट में कैसे जोड़ें

button टेम्पलेट चुनने से प्रोडक्शन में भेजने तक, चार चरण।

01~30s

Pick a Button Template

Scan the six templates and start from the closest surface — the full variant set for a design system, the async submit for a form, the icon-only for a toolbar.

02~10s

Copy the Prompt

Take the prompt into MeDo, Lovable, Bolt, v0 or Cursor. Swap in your brand color, radius and font before you run it, since those three values are what every variant inherits.

03~1min

Generate and Refine

You get React + Tailwind back with a live preview. Follow up in plain English — "add an xs size", "make the disabled state use aria-disabled" — rather than hand-editing the class lookups.

04~2min

Replace Your Ad-Hoc Buttons

Import one Button and delete the one-off styles it supersedes. The value is in the variants sharing a spacing scale and focus ring by construction, which only holds if nothing else on the page is styling its own button.

Button के बारे में सामान्य प्रश्न

AI से बटन कम्पोनेंट कैसे जेनरेट करें?

एक प्रॉम्प्ट में ज़रूरी वेरिएंट, साइज़ और स्टेट्स बताएं — जैसे "तीन साइज़ में primary, secondary और ghost वेरिएंट, hover, disabled और loading स्टेट्स के साथ" — और MeDo सभी कॉम्बिनेशन जोड़कर पूरा कम्पोनेंट जेनरेट करता है। आपको एक हार्ड-कोडेड बटन नहीं, पूरे सेट को कवर करने वाली एक फ़ाइल मिलती है।

डिज़ाइन सिस्टम में कौन से बटन वेरिएंट होने चाहिए?

ज़्यादातर प्रोडक्ट को चार चाहिए: स्क्रीन की सबसे महत्वपूर्ण एक्शन के लिए primary, सहायक एक्शन के लिए secondary, घनी UI में कम ज़ोर वाली एक्शन के लिए ghost या tertiary, और अपरिवर्तनीय कामों के लिए destructive। इससे ज़्यादा वेरिएंट आमतौर पर स्टाइल की कमी नहीं, बल्कि हायरार्की की समस्या दिखाते हैं।

क्या AI एक्सेसिबल बटन जेनरेट कर सकता है?

हाँ। MeDo स्पष्ट type एट्रिब्यूट वाले असली button एलिमेंट, focus-visible rings, केवल-आइकन बटन के लिए एक्सेसिबल नाम, और स्क्रीन रीडर द्वारा सही तरीके से बोले जाने वाले disabled स्टेट्स रेंडर करता है। प्रॉम्प्ट में एक्सेसिबिलिटी का ज़िक्र करें और यह loading के दौरान aria-busy भी जोड़ देगा।

बटन में loading स्टेट कैसे जोड़ें?

एक loading प्रॉप मांगें जो लेबल को स्पिनर से बदले, बटन की चौड़ाई फिक्स रखे, इंटरैक्शन बंद करे और aria-busy सेट करे ताकि असिस्टिव टेक पेंडिंग स्टेट बता सके। चौड़ाई फिक्स करना ही वह हिस्सा है जो लोग भूल जाते हैं — इसके बिना हर क्लिक पर पेज दोबारा फ्लो होता है।

बटन को button होना चाहिए या link?

अगर वह नेविगेट करता है तो anchor होना चाहिए; अगर कोई एक्शन करता है तो button। MeDo को बताएं आपको कौन सा व्यवहार चाहिए और यह सही एलिमेंट रेंडर करेगा, साथ में asChild जैसा विकल्प भी देता है जब आपको रूटेड लिंक पर बटन स्टाइलिंग चाहिए हो।

क्या मैं अपने मौजूदा ब्रांड से मेल खाते बटन जेनरेट कर सकता हूं?

हाँ। प्रॉम्प्ट में MeDo को अपना ब्रांड कलर, कॉर्नर radius, फ़ॉन्ट और मौजूदा स्पेसिंग स्केल दें, और जेनरेट किए गए वेरिएंट उन्हें एक-समान तरीके से उपयोग करेंगे। आप अपने कोडबेस का कोई मौजूदा बटन पेस्ट करके MeDo से उसे पूरे वेरिएंट सेट में बढ़ाने के लिए भी कह सकते हैं।

अभी अपना button जेनरेट करें।

कोई भी प्रॉम्प्ट आज़माएं — मुफ्त, कोई साइन अप नहीं।