Loading States

dylantarre/animation-principles/skills/05-by-animation-type/loading-states

作者 dylantarre83597134ba8f無授權條款99 個星標收錄於 2026年10月8日更新於 2026年10月8日儲存庫9 個月前更新

Use when indicating progress or waiting - spinners, progress bars, skeleton screens, shimmer effects, or any animation showing the system is working.

僅含說明Design & Creative
AI 產生的概覽

為載入指示設計提供指引,涵蓋載入旋轉圖示、進度條與骨架畫面,並運用動畫原則。

功能
此技能為載入狀態提供設計指引,將迪士尼動畫十二原則套用於旋轉圖示、進度條、骨架畫面與微光效果。它提供出現延遲、最短顯示時間與動畫週期的時間建議,並提供微光、旋轉圖示、進度填滿以及載入到內容轉場的 CSS 實作模式。它也列出關鍵規則,例如延遲旋轉圖示出現以及尊重減少動態效果偏好。
適用情境
當需要在介面中表示進度或等待時使用,例如加入旋轉圖示、進度條、骨架畫面或微光效果。它適合需要用動畫表明系統正在運作的情境。
執行需求
不需要指令碼或特殊工具,僅為說明性內容。套用其中的 CSS 模式需要專案支援 CSS 動畫。

Loading State Animations

Apply Disney's 12 principles to communicate system activity.

Principle Application

Squash & Stretch: Progress indicators can pulse/breathe to show life. Slight scale oscillation (0.98-1.02).

Anticipation: Show loading state immediately on action. Don't wait for slow response to show spinner.

Staging: Loading indicators appear where content will be. Skeleton screens match final layout.

Straight Ahead vs Pose-to-Pose: Design loading as a sequence: instant indicator → progress → completion → content.

Follow Through & Overlapping: Loading fades as content enters. Overlap the transition by 100ms.

Slow In/Slow Out: Progress bars ease-in-out between known percentages. Indeterminate uses smooth oscillation.

Arcs: Circular spinners follow true circular paths. Avoid jerky rotation.

Secondary Action: Skeleton shimmer + subtle pulse. Multiple signals reinforce "loading."

Timing:

  • Show spinner after 200ms delay (avoid flash for fast loads)
  • Minimum display: 500ms (prevent jarring flash)
  • Skeleton shimmer cycle: 1500-2000ms

Exaggeration: Keep minimal - loading shouldn't distract, just reassure.

Solid Drawing: Skeletons should match content proportions. Wrong shapes break the illusion.

Appeal: Loading should feel optimistic, not tedious. Smooth motion suggests progress.

Timing Recommendations

Loading TypeAppear DelayMin DisplayAnimation Cycle
Spinner200ms500ms700-800ms
Progress Bar0ms-smooth fill
Skeleton0ms500ms1500ms shimmer
Button Spinner0ms400ms600ms
Full Page100ms800ms1000ms

Implementation Patterns

css
/* Skeleton shimmer */.skeleton {  background: linear-gradient(    90deg,    #e0e0e0 0%,    #f0f0f0 50%,    #e0e0e0 100%  );  background-size: 200% 100%;  animation: shimmer 1500ms ease-in-out infinite;}
@keyframes shimmer {  0% { background-position: 200% 0; }  100% { background-position: -200% 0; }}
/* Spinner with smooth rotation */.spinner {  animation: spin 700ms linear infinite;  opacity: 0;  animation: fade-in 200ms 200ms ease-out forwards, spin 700ms linear infinite;}
/* Progress bar with easing */.progress-fill {  transition: width 300ms cubic-bezier(0.4, 0, 0.2, 1);}

Loading-to-Content Transition

css
.content-enter {  animation: content-reveal 300ms ease-out forwards;}
@keyframes content-reveal {  from {    opacity: 0;    transform: translateY(10px);  }  to {    opacity: 1;    transform: translateY(0);  }}

Key Rules

  1. Delay spinner appearance by 200ms to avoid flash
  2. Keep loading visible minimum 500ms once shown
  3. Skeleton shapes must match real content dimensions
  4. Transition smoothly from loading to content - never pop
  5. Respect prefers-reduced-motion - show static indicator instead

來源與署名

來源:dylantarre/animation-principles位於skills/05-by-animation-type/loading-states提交8359713

授權條款: 無授權條款

內容歸原作者所有。SourceWeft 從公開儲存庫中收錄這些內容。

檢舉或申請下架