AI載入動畫生成器。

話畀MeDo知你需要咩類型嘅載入動畫——環形、彈跳圓點、脈衝圓圈、骨架屏覆蓋——即刻取得生產就緒嘅元件程式碼。唔使搜尋CodePen,唔使手動調整keyframes。

載入動畫
載入動畫

載入動畫係應用程式慢嗰陣用戶最先見到嘅嘢。

每個非同步操作——數據獲取、表單提交、檔案上載——都需要載入狀態。缺失或生硬嘅載入動畫會侵蝕信任,令應用程式感覺好似壞咗咁。精心製作嘅載入動畫傳達進度、匹配你嘅設計系統、令用戶保持耐心。呢個係一個細小嘅元件,但對感知效能有住不成比例嘅巨大影響。

6 個模板

可以產生的 載入動畫 模板

每個模板都是真實的提示詞,而非截圖。複製到任何 AI 編輯器,或在 MeDo 中執行,直接取得 React + Tailwind 程式碼。

BasicRing

Rotating Ring Spinner

One arc rotating on a faint track. The default for anything under about a second, where a skeleton would flash in and out faster than the eye can resolve it.

Create a circular ring spinner with size variants sm 32px, md 48px and lg 64px, each keeping stroke width proportional so the small variant does not read as a thin grey circle. Render one visible arc over a low-contrast full track so the direction of rotation is legible. Wrap it in an element with role="status" and a visually hidden "Loading" label, and set aria-live="polite" so completion is announced once rather than repeatedly. Under prefers-reduced-motion: reduce, replace the rotation with a two-second opacity pulse rather than removing the indicator. Give the wrapper a fixed height matching the largest variant so mounting the spinner does not shift the surrounding layout.

在 MeDo 中試試
IndeterminateDots

Three Bouncing Dots

Reads as activity rather than progress, which is honest when you have no idea how long the request will take. Better than a ring inside a chat bubble or a narrow row.

Create a three-dot loading indicator: dots of 8px with 6px gaps, each animating a 400ms vertical bounce staggered by 120ms so the sequence reads left to right. Keep the total width fixed so the row does not reflow as dots move. Wrap it in role="status" with a visually hidden label describing what is loading — "Loading messages" rather than "Loading" — and set aria-live="polite". Under prefers-reduced-motion: reduce, hold the dots static and cross-fade their opacity instead of translating them. Provide a colour prop that inherits currentColor by default so the indicator matches whatever text it sits beside.

在 MeDo 中試試
InlineButton

Button With a Pending Spinner

The spinner that prevents the most damage, because the alternative is a double-submitted order. Keep the button width fixed or the layout jumps at the worst possible moment.

Create a button component with a pending state: when pending is true, prepend a 16px ring spinner before the label, set aria-busy="true" and the disabled attribute, and keep the button width identical to its idle state by reserving the spinner space in both. Do not remove the label text — swapping "Place order" for a bare spinner destroys the accessible name mid-interaction. Announce the state change through a separate role="status" element rather than an aria-live on the button itself. Under prefers-reduced-motion: reduce, use an opacity pulse. Block repeat clicks in the handler as well as via the disabled attribute, since disabled arrives one render late.

在 MeDo 中試試
Content shapeSkeleton

Skeleton Blocks Instead of a Spinner

Past roughly 500ms a spinner stops reassuring and starts reading as a stall. Skeletons show the shape of what is coming, which shortens the wait without shortening the request.

Create a skeleton loader for a card list: rounded grey blocks matching the real layout — a 40px circle for the avatar, two text bars at 60% and 40% width, and a 160px image block — with a slow left-to-right shimmer. Match the block heights to the rendered content exactly so swapping in real data causes no layout shift. Mark the container aria-busy="true" and aria-hidden on the blocks themselves so screen readers get one status announcement rather than a stream of empty elements. Under prefers-reduced-motion: reduce, drop the shimmer and hold a flat tint. Add a threshold prop so the skeleton only appears after 300ms and never flashes on a fast response.

在 MeDo 中試試
Full pageOverlay

Blocking Route Transition Overlay

A centered spinner over a scrim for the rare case where the whole view is unusable. Use it sparingly — blocking the page for a partial fetch makes a fast app feel slow.

Create a full-page loading overlay: a translucent scrim over the app with a 64px ring spinner and a short label centered in the viewport. Lock body scroll while visible, mark the underlying content aria-hidden="true", and use role="status" with aria-live="polite" on the overlay so the state is announced once. Trap focus inside the overlay or move focus to the status text so the keyboard cannot reach controls behind the scrim. Delay the appearance by 300ms so a fast response never produces a flash, and fade out over 150ms rather than snapping. Under prefers-reduced-motion: reduce, hold a static indicator with a text label instead of rotating.

在 MeDo 中試試
DeterminateProgress

Ring With a Percentage Value

When you know the fraction complete — an upload, a multi-step import — show it. A spinning ring on a 40MB upload hides the one number the user wants.

Create a determinate circular progress ring driven by a value prop from 0 to 100: an SVG circle whose stroke-dashoffset is computed from the value, with the percentage rendered in the center. Use role="progressbar" with aria-valuenow, aria-valuemin and aria-valuemax, and an aria-label describing the operation. When value is null, fall back to the indeterminate spinning arc with role="status" instead. Animate stroke-dashoffset transitions over 200ms so incremental updates do not appear to jump, and under prefers-reduced-motion: reduce apply the value changes without a transition. Reserve the full ring diameter in layout from the first render.

在 MeDo 中試試

如何自訂你的 載入動畫

匹配你嘅品牌色板

喺提示詞中指定你嘅主色同描邊粗幼。使用品牌藍或強調色嘅載入動畫睇落係有意為之嘅;預設灰色嘅睇落好似從未被替換嘅佔位符。

揀選合適嘅動畫模式

環形載入動畫適合精確、聚焦嘅載入(按鈕提交)。彈跳圓點暗示活動但唔暗示進度。脈衝覆蓋層適合全頁面過渡。話畀MeDo知使用場景,佢會揀選正確嘅動效模式。

由一開始就加入尺寸變體

叫MeDo生成sm、md同lg尺寸prop,咁同一個元件就可以作為內聯按鈕載入動畫、卡片骨架屏載入器同全螢幕覆蓋層——全部來自同一個源。

包含無障礙標籤

載入動畫喺冇aria-label或視覺隱藏文字嗰陣對螢幕閱讀器係不可見嘅。叫MeDo包含視覺隱藏嘅「載入中」標籤同aria-live區域,令輔助科技能夠喺載入完成時發出通知。

誰在使用 載入動畫 組件

SaaS儀表板

數據表格儲存格內嘅內聯環形載入動畫同首次登入時嘅全頁覆蓋載入動畫——為用戶提供清晰回饋,而唔會因細小請求而阻塞成個介面。

電商結帳

提交時替換「落單」標籤嘅脈衝按鈕載入動畫——防止重複點擊,同時令客戶安心其訂單正在處理中。

流動優先Web應用

匹配應用主題風格嘅彈跳圓點載入動畫,喺內容載入期間出現喺卡片骨架屏中——喺社交動態同即時通訊介面中好常見。

開發者工具或CLI儀表板

柔和灰色嘅極簡單色環形載入動畫,尺寸細小,適合放喺日誌輸出面板或狀態徽章內,唔會分散對內容嘅注意力。

不同網站的 載入動畫 方案

同一個 載入動畫 組件,針對它所在網站的類型作調整。

01 / 06

SaaS Dashboard Loading

Skeleton the widget grid rather than covering the whole dashboard, so the shell, nav and filters stay usable while one chart resolves. A full-page overlay on a dashboard punishes the user for the slowest panel on the screen.

載入動畫 的風格與變體

挑選與頁面其餘部分相襯的變體,然後產生它。

01 / 06

Ring Spinner

A single arc over a faint track. Keep the stroke proportional across size variants — a 32px ring with the same 4px stroke as the 64px one reads as a solid donut, not a spinner. The right choice under a second.

在 React、Next.js、Vue 與 Svelte 中使用 載入動畫

React、Next.js、Vue 3、SvelteKit、Astro 或純 HTML —— 同一個 載入動畫,六種接入方式。

01 / 06

React Loading Spinner

No state and no effects — a spinner is pure markup plus a keyframe, so it never needs a hook. Put the delay threshold in the parent that owns the fetch, not in the spinner itself.

src/components/Spinner.tsx

export function Spinner({ size = 'md', label = 'Loading' }) {
  return (
    <span role="status" className={ring[size]}>
      <span className="sr-only">{label}</span>
    </span>
  )
}

如何把 載入動畫 加入專案

四個步驟,從挑選 載入動畫 模板到推上生產環境。

01~30s

Pick a Loading Pattern

Choose by expected duration and how much of the view is blocked — a ring under a second, a skeleton past 500ms, an inline button spinner for a submit, a determinate ring when you know the percentage.

02~10s

Copy the Prompt

Paste it into MeDo, Lovable, Bolt, v0 or Cursor. Name what is loading in the label — "Loading invoices" beats "Loading", because the hidden label is the only thing a screen reader gets.

03~1min

Generate and Refine

You get React + Tailwind with a live preview. Follow up in plain English — "add a 300ms delay before it shows", "swap rotation for a pulse under reduced motion", "keep the button width fixed".

04~1min

Wire It to Your Loading State

Hook it to Suspense, a route loading file or an isPending flag, and reserve the space it occupies. Throttle the network in devtools and confirm nothing shifts when the real content lands.

關於 載入動畫 的常見問題

點樣用AI建立載入動畫?

喺MeDo中描述你需要嘅載入動畫——動畫風格(環形、圓點、脈衝)、大小、顏色,以及是否需要尺寸變體或標籤。MeDo會生成完整嘅元件程式碼,包括CSS keyframes或Tailwind動畫類別,可直接貼到你嘅項目中。

最好嘅AI載入動畫生成器係咩?

MeDo專為生成生產就緒嘅UI元件而建構。與輸出粗糙程式碼片段嘅通用AI工具唔同,MeDo生成乾淨、無障礙嘅載入動畫元件,具有正確嘅aria屬性、可配置嘅props同匹配你設計系統嘅動畫。

可以用AI生成純CSS載入動畫嗎?

可以。喺MeDo提示詞中指定「純CSS,冇JavaScript」,佢會生成使用純CSS keyframe動畫嘅載入動畫——冇依賴,唔需要JavaScript。非常適合輕量級行銷頁面或無法添加元件庫嘅場景。

點樣令載入動畫具有無障礙性?

叫MeDo包含一個視覺隱藏嘅文字標籤(如「正在載入,請稍候」)並喺載入容器上設定aria-busy。MeDo會輸出正確嘅aria-label、role="status"同live區域,令螢幕閱讀器自動播報載入狀態變化。

點樣喺React按鈕中加入載入動畫?

畀MeDo呢個提示詞:「建立一個React按鈕元件,帶有載入狀態,當isLoading為true時將標籤替換為細型內聯載入動畫,停用按鈕並防止重複提交。」MeDo會生成完整嘅元件,包含整合嘅無障礙載入動畫。

載入動畫同骨架屏載入器有咩分別?

載入動畫係一種通用動畫,指示正在載入但唔揭示佈局。骨架屏載入器模仿即將到來嘅內容嘅形狀,透過即刻顯示結構嚟減少感知等待時間。MeDo可以根據你嘅提示詞生成任一種——或一個過渡到骨架屏嘅載入動畫。