MeDo

AI टोस्ट जेनरेटर।

अपना नोटिफिकेशन व्यवहार बताएं और MeDo पूरा टोस्ट सिस्टम जेनरेट करता है — चार सिमेंटिक टाइप, एक स्टैकिंग क्यू, हॉवर पर रुकने वाले ऑटो-डिसमिस टाइमर, टच पर स्वाइप-टू-डिसमिस, और हर टाइप के लिए सही aria-live पोलाइटनेस।

टोस्ट
टोस्ट

टोस्ट असल में एक टाइमर, एक क्यू और एक लाइव रीजन है जो डिब्बे का रूप ले लेता है

टोस्ट का विज़ुअल हिस्सा कुछ मिनटों का काम है। उसके नीचे जो है, वह नहीं। टोस्ट को तय करना होता है कि वह कितनी देर रहेगा, तीन एक साथ आ जाएं तो क्या होगा, यूज़र फॉर्म भरने के बीच में हो तो क्या होगा, और स्क्रीन रीडर उसे बिना टोके कैसे पढ़ेगा। कम स्पष्ट नतीजा यह है कि टोस्ट के बग भरोसे के बग बनकर सामने आते हैं: सेव कन्फर्मेशन जो पढ़े जाने से पहले गायब हो जाए, या एरर जो उस फील्ड को पढ़ते हुए ही मिट जाए जिसकी वह बात कर रहा था — यह लोगों को इंटरफेस पर भरोसा न करना सिखा देता है। टाइमिंग नियम, क्यू लिमिट और लाइव-रीजन पोलाइटनेस को साथ जेनरेट करने से ये फैसले हर कॉल साइट पर बिखरने के बजाय एक जैसे बने रहते हैं।

6 टेम्पलेट

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

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

BasicFour Tones

Success, Error, Warning, Info Stack

The baseline set, and the only one where per-type rules matter more than styling. Errors that auto-dismiss are the single most common toast bug in production.

Create a toast system with four semantic types — success with a check icon and green accent, error with an alert icon and red accent, warning with a triangle and amber accent, info with a circle and blue accent. Each toast is 360px wide with a 12px radius, 16px padding, a semibold title, an optional description and a close button with an accessible label. Stack in the bottom-right with 8px gaps, newest on top, three visible at once and the rest queued. Auto-dismiss success, info and warning after 5000ms; keep errors until the user closes them. Wrap non-error toasts in role="status" with aria-live="polite" and give errors role="alert". Slide in 16px from the right and fade out; under prefers-reduced-motion, fade only.

MeDo में आज़माएं
TimingPausable Timer

Countdown Bar That Freezes on Hover

A visible progress bar plus a timer that stops while the pointer or keyboard focus is on the toast. Without the pause, a toast can vanish while the user is reaching for its own action button.

Create a toast with a visible dismiss countdown: a 2px progress bar along the bottom edge animating from full to zero over the toast duration. Pause the timer and freeze the bar on pointerenter and on focusin anywhere inside the toast, then resume from the remaining time on pointerleave and focusout — track elapsed time explicitly rather than restarting the interval, or the toast will live longer every time the pointer crosses it. Reset to the full duration when the toast content is updated in place. Under prefers-reduced-motion, replace the animated bar with a static severity stripe and keep the timer behaviour unchanged. Keep the toast in a role="status" region with aria-live="polite".

MeDo में आज़माएं
UndoAction Toast

Toast With an Undo or Retry Action

The moment a toast carries a button, it stops being decoration and becomes the only route to a reversible operation — so it must not auto-dismiss while the action is still valid.

Create a toast variant with a single inline action button — Undo or Retry — beside the close control. Do not auto-dismiss while an action is present unless the caller passes an explicit duration, and never dismiss on a timer shorter than the window in which the action is still valid server-side. Move keyboard focus nowhere on mount; instead expose the toast region via a landmark and make the action reachable through a documented shortcut plus normal tab order, so a toast never steals focus from a form the user is typing in. Announce the toast with role="status" and aria-live="polite", and include the action label in the announced text so the option is heard, not just seen.

MeDo में आज़माएं
AsyncPromise Toast

One Toast That Updates in Place

Pending, then success or error, on the same node. Firing a second toast when a request resolves stacks two notifications about one event and doubles the screen reader announcement.

Create a promise-driven toast that mounts in a pending state with a spinner and a loading title, then updates the same toast node to success or error when the promise settles rather than mounting a second toast. Keep the toast ID stable across the transition so the stack position does not change, swap the icon and accent, and start the auto-dismiss timer only once the promise resolves. On rejection, switch the container to role="alert" and cancel auto-dismiss. Because the live region content changes in place, debounce the announcement so a request that resolves in under 400ms announces the final state only. Cap the pending state with a timeout that converts to an error toast rather than spinning forever.

MeDo में आज़माएं
MobileSwipe Toast

Top-Center Toast With Swipe Dismiss

On a phone the bottom corner is under the thumb and the home indicator. Top-center with a horizontal drag threshold is the only placement that does not fight the platform.

Create a mobile-first toast pinned to the top-center with a safe-area inset using env(safe-area-inset-top), full width minus 16px gutters, capped at a single line of title text with the description truncated to two lines. Add horizontal swipe-to-dismiss with a 60px or 40% drag threshold, translating with the pointer and springing back below the threshold; suppress the pointer handlers while the user is scrolling the page underneath. Keep the close button hit area at 44px even though the glyph is 16px. Show one toast at a time and replace rather than stack, since a stack on a 375px viewport covers the content. Use role="status" with aria-live="polite" and disable the spring under prefers-reduced-motion.

MeDo में आज़माएं
SnackbarCompact Snackbar

Single-Line Bar With No Icon

One line, no title, no icon — for low-stakes confirmations like "Link copied" where a 360px card with an icon block is more furniture than the message deserves.

Create a compact snackbar toast: a single line of 14px text on a dark surface, 8px radius, 12px vertical and 16px horizontal padding, no icon and no separate title, with an optional text-only action on the right. Anchor it bottom-center with a 24px offset and allow only one at a time — a new snackbar replaces the current one and resets its 4000ms timer instead of queueing, because these fire from rapid interactions like copy and toggle. Announce via role="status" with aria-live="polite", and when the text is identical to the previous message, force re-announcement by clearing the live region for one frame. Fade and lift 8px on entry; fade only under prefers-reduced-motion.

MeDo में आज़माएं

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

एरर के लिए बाकी सबसे अलग नियम रखें

success, info और warning के लिए ऑटो-डिसमिस मांगें, और एरर के लिए कि वे बंद किए जाने तक बने रहें। एरर आमतौर पर यूज़र से कुछ करवाना चाहते हैं, और जो संदेश समझे जाने से पहले खुद हट जाए वह बिना संदेश से भी बुरा है।

स्टैक लिमिट तय करें और ओवरफ्लो का व्यवहार बताएं

बताएं कि एक बार में कितने टोस्ट दिख सकते हैं — तीन एक वाजिब सीमा है — और अतिरिक्त वाले पीछे क्यू में रहेंगे या सबसे पुराने को बदल देंगे। लिमिट के बिना, प्रति-आइटम नोटिफिकेशन भेजने वाला लूप पूरा व्यूपोर्ट ढक देगा।

हॉवर और फोकस पर टाइमर रोकने को कहें

प्रॉम्प्ट में कहें कि जब तक पॉइंटर टोस्ट पर है या उसके भीतर किसी कंट्रोल पर कीबोर्ड फोकस है, डिसमिस काउंटडाउन रुका रहे। वरना टोस्ट ठीक उसी वक्त गायब हो सकता है जब यूज़र उसके एक्शन बटन तक पहुंच रहा हो।

कोना और सेफ एरिया नाम से बताएं

एक प्लेसमेंट चुनें और उसे बताएं: नीचे-दाएं ज्यादातर प्राइमरी नेविगेशन से दूर रहता है, ऊपर-मध्य सबसे तेज़ पढ़ा जाता है। मोबाइल पर env(safe-area-inset-bottom) पैडिंग मांगें ताकि टोस्ट होम इंडिकेटर या फिक्स्ड टैब बार के नीचे न चला जाए।

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

SaaS प्रोडक्ट

ऑटोसेव और इनवाइट की पुष्टि करने वाले छोटे success टोस्ट, और बैकग्राउंड सिंक फेल होने पर "फिर कोशिश करें" एक्शन वाले स्थायी error टोस्ट। नीचे-दाएं प्लेसमेंट उन्हें ऐप साइडबार से दूर रखता है।

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

थंबनेल और "कार्ट देखें" लिंक वाला "कार्ट में जोड़ा गया" टोस्ट, जो पांच सेकंड बाद हट जाता है। स्टॉक और पेमेंट फेल्योर error टाइप उपयोग करते हैं और टिके रहते हैं ताकि खरीदार पढ़ सके कि क्या गलत हुआ।

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

बल्क ऑपरेशन हर रिकॉर्ड के लिए एक के बजाय एक सारांश टोस्ट भेजते हैं, और लंबे चलने वाले जॉब ऊपर दूसरा नोटिफिकेशन स्टैक करने के बजाय एक ही टोस्ट को पेंडिंग से success में वहीं अपडेट कर देते हैं।

मोबाइल वेब ऐप

स्वाइप-टू-डिसमिस और सेफ-एरिया इनसेट वाले ऊपर-मध्य टोस्ट, एक लाइन के आकार में रखे गए ताकि वे उस फील्ड को कभी न ढकें जिसमें यूज़र टाइप कर रहा है।

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

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

01 / 06

SaaS Product Toasts

Autosave confirmations and invite receipts, bottom-right so they clear the sidebar. The rule that matters most here is that background-sync failures get persistent error toasts with a Retry action — a sync error that dismisses itself is indistinguishable from a sync that worked.

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

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

01 / 06

Card Toast With Icon and Accent

The full anatomy: icon, semibold title, description, close button, colored accent. Worth the vertical space when the message has a subject and a detail. It is overkill for "Copied" — use the snackbar for those.

React, Next.js, Vue और Svelte में टोस्ट

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

01 / 06

React Toast

A context provider holding the queue plus a portal for the container. Mount the provider once above the router so navigating between routes does not unmount the toast that was just fired.

src/components/ToastProvider.tsx

export function ToastProvider({ children }) {
  const [toasts, setToasts] = useState([])
  const push = (t) => setToasts((prev) => [...prev, { id: uid(), ...t }])

  return (
    <ToastContext.Provider value={{ push }}>
      {children}
      {createPortal(<ToastStack toasts={toasts} />, document.body)}
    </ToastContext.Provider>
  )
}

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

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

01~30s

Pick a Toast Pattern

Choose by the event, not the look: the four-tone stack for general notifications, the promise toast for async jobs, the action toast for anything reversible, the swipe variant for phone-first surfaces.

02~10s

Copy the Prompt

Take it into MeDo, Lovable, Bolt, v0 or Cursor. Set the duration and the stack limit before you run it, and decide there whether errors auto-dismiss — that is the decision you will otherwise relitigate at every call site.

03~1min

Generate and Refine

You get the provider, the queue and the toast back with a live preview. Follow up in plain English — "pause the timer on hover", "move it to top-center on mobile", "cap the stack at two" — instead of hand-editing timer logic.

04~2min

Mount the Provider Once

Put it above the router in your root layout so a toast fired just before a navigation survives it, then fire one from a real form submit and confirm a screen reader announces it without cutting off the page.

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

AI से टोस्ट नोटिफिकेशन कम्पोनेंट कैसे जेनरेट करें?

सिमेंटिक टाइप, प्लेसमेंट और टाइमिंग एक ही प्रॉम्प्ट में बताएं — जैसे "success, error, warning और info टोस्ट नीचे-दाएं स्टैक्ड, एरर के अलावा 5 सेकंड बाद ऑटो-डिसमिस" — और MeDo प्रोवाइडर, क्यू और टोस्ट खुद जेनरेट कर देता है। आपको मार्कअप के साथ ट्रिगर फंक्शन भी मिलता है, न कि एक स्टैटिक डिब्बा जिसे आपको अब भी वायर करना पड़े।

टोस्ट स्क्रीन पर कितनी देर रहना चाहिए?

छोटी पुष्टि के लिए चार से छह सेकंड ठीक है, और 5000ms एक समझदार डिफ़ॉल्ट है। लंबे संदेशों को ज्यादा समय चाहिए क्योंकि न्यूनतम अवधि पढ़ने की गति तय करती है, सुंदरता नहीं। एरर और एक्शन बटन वाली कोई भी चीज़ ऑटो-डिसमिस नहीं होनी चाहिए।

अलर्ट और टोस्ट में क्या अंतर है?

टोस्ट क्षणिक होता है और पेज के ऊपर एक निश्चित कोने में तैरता है, इसलिए यह उस चीज़ की पुष्टि के लिए सही है जो यूज़र ने अभी किया। इनलाइन अलर्ट डॉक्यूमेंट फ्लो का हिस्सा होता है और स्थिति बदलने तक बना रहता है, इसलिए यह उस स्टेट के लिए सही है जो एक क्रिया से आगे टिकती है — फेल हुआ बिलिंग मेथड, मेंटेनेंस विंडो, फॉर्म-लेवल एरर। अगर यूज़र को लौटकर पढ़ पाने की जरूरत है, तो अलर्ट उपयोग करें।

टोस्ट में role="status" या role="alert" उपयोग करें?

success और जानकारी वाले टोस्ट के लिए role="status" के साथ aria-live="polite" उपयोग करें ताकि अनाउंसमेंट बोलने में ठहराव का इंतज़ार करे। role="alert", जो निहित रूप से assertive है और टोकता है, उसे सिर्फ उन एरर और वॉर्निंग के लिए रखें जिन पर तुरंत ध्यान चाहिए। हर टोस्ट को alert मार्क करने से स्क्रीन रीडर लगातार यूज़र के ऊपर बोलता रहता है।

क्या मैं कई टोस्ट बिना ओवरलैप स्टैक कर सकता हूं?

हाँ। MeDo से ऐसा टोस्ट कंटेनर मांगें जो निश्चित गैप के साथ सीमित स्टैक रेंडर करे और लिमिट से आगे की चीज़ें क्यू में रखे, और जैसे ही एक बंद हो अगला रिलीज़ करे। एक्ज़िट ट्रांज़िशन जोड़ना और एनिमेशन खत्म होने तक जाने वाले आइटम की ऊंचाई रिज़र्व रखना बाकी टोस्ट को उछलने से रोकता है।

क्या टोस्ट टच डिवाइस पर काम करता है?

करता है, अगर आप जेस्चर सपोर्ट मांगें। ड्रैग थ्रेशोल्ड वाला हॉरिजॉन्टल स्वाइप-टू-डिसमिस बताएं, क्लोज बटन का टैप एरिया कम से कम 44px रखें, और सेफ-एरिया इनसेट पैडिंग जोड़ें ताकि टोस्ट होम इंडिकेटर और किसी भी फिक्स्ड बॉटम बार से बचा रहे।

अभी अपना टोस्ट जेनरेट करें।

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