Icons Badges

dylantarre/animation-principles/skills/07-by-ui-element/icons-badges

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

Use when animating icons, badges, avatars, status indicators, or small visual elements to add personality and feedback

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

將迪士尼十二項動畫原則套用於圖示、徽章、頭像與狀態指示器,並附上 CSS 範例。

功能
這項技能為圖示、徽章、頭像與狀態指示器等小型介面元素提供動畫指引。它把迪士尼十二項動畫原則逐條對應到具體的圖示與徽章行為,並提供懸停、點擊、徽章彈跳、鈴鐺搖動與狀態脈衝的時長數值與 CSS 程式碼片段。產出的是書面動畫指引與範例 CSS,而不是可直接執行的工具。
適用情境
當需要為通知徽章、按讚按鈕、鈴鐺或狀態圓點等小型介面元素加入動態、個性或回饋時使用。適合需要統一時間長度與緩動曲線的圖示與徽章動畫的設計或前端工作。
執行需求
不需要指令碼或特殊工具,這項技能僅為說明性內容。套用其中的 CSS 範例需要專案具備 CSS 與 SVG 圖示。

Icon & Badge Animation Principles

Apply Disney's 12 principles to small UI elements for personality and meaningful feedback.

Principles Applied to Icons

1. Squash & Stretch

Heart icons can squash/stretch on "like" tap. Notification badges can bounce with squash on arrival. Adds life to small elements.

2. Anticipation

Before icon action, brief scale down (0.9) for 50ms. Bell can tilt back before ringing forward. Prepares for action.

3. Staging

Active/important icons should be visually prominent: color, size, or animation. Badges use contrasting colors to stand out.

4. Straight Ahead & Pose to Pose

Simple icons use pose-to-pose (two states). Complex icon animations (morphing) can use straight-ahead for organic transitions.

5. Follow Through & Overlapping Action

Bell ring continues after user interaction stops. Badge number updates before badge bounce settles. Multi-part icons offset timing.

6. Ease In & Ease Out

Icon hover: ease-out. Icon click: ease-in-out. Bounce: cubic-bezier(0.68, -0.55, 0.27, 1.55) for overshoot.

7. Arcs

Bell swinging follows pendulum arc. Refresh icons spin in true circular arcs. Arrows can arc during state changes.

8. Secondary Action

While icon scales (primary), color changes (secondary), glow pulses (tertiary). Badge count changes while badge bounces.

9. Timing

  • Hover scale: 100-150ms
  • Click feedback: 50-100ms
  • Badge bounce: 300-400ms
  • Bell ring: 400-600ms
  • Status pulse: 1500-2500ms
  • Morph transition: 250-350ms

10. Exaggeration

Celebratory icons (confetti, hearts) can be very animated. Functional icons (menu, close) should be subtle. Match purpose.

11. Solid Drawing

Icons must remain crisp at all animation frames. Maintain stroke consistency. Badge numbers should be legible during motion.

12. Appeal

Animated icons add personality. A bouncing notification feels alive. A pulsing status feels responsive. Small touches matter greatly.

CSS Implementation

css
.icon-btn:hover .icon {  transform: scale(1.15);  transition: transform 150ms ease-out;}
.icon-btn:active .icon {  transform: scale(0.9);  transition: transform 50ms ease-in;}
.badge {  animation: badgeBounce 400ms cubic-bezier(0.68, -0.55, 0.27, 1.55);}
@keyframes badgeBounce {  0% { transform: scale(0); }  50% { transform: scale(1.2); }  100% { transform: scale(1); }}
.status-indicator {  animation: pulse 2000ms ease-in-out infinite;}
@keyframes pulse {  0%, 100% { opacity: 1; transform: scale(1); }  50% { opacity: 0.6; transform: scale(1.1); }}
.bell-icon:hover {  animation: ring 500ms ease-in-out;}
@keyframes ring {  0%, 100% { transform: rotate(0); }  20%, 60% { transform: rotate(15deg); }  40%, 80% { transform: rotate(-15deg); }}

Key Properties

  • transform: scale, rotate
  • opacity: pulse effects
  • animation: complex sequences
  • fill/stroke: SVG color changes
  • filter: glow effects

來源與署名

來源:dylantarre/animation-principles位於skills/07-by-ui-element/icons-badges提交8359713

授權條款: 無授權條款

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

檢舉或申請下架