Navigation Menus

dylantarre/animation-principles/skills/07-by-ui-element/navigation-menus

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

Use when animating navigation bars, menus, sidebars, or wayfinding elements to create smooth, intuitive transitions

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

運用迪士尼十二項動畫原則,為導覽列、選單和側邊欄提供動畫指引。

功能
此技能提供用於導覽列、下拉式選單、側邊欄及其他尋路元素動畫的原則與 CSS 指引。它將迪士尼十二項動畫原則對應到導覽互動,涵蓋狀態、時間、緩動、錯開與次要動作。內容包含下拉式選單與作用中指示器的範例 CSS,以及可動畫屬性的清單。
適用情境
適用於為導覽列、選單、側邊欄或尋路元素加入或調整動效的情境。適合需要流暢、直覺的轉場,並在各選單狀態間維持一致時間設定的工作。
執行需求
不需要指令碼或特殊工具,僅為說明性內容。CSS 範例假定執行環境支援 CSS 轉場與變形。

Navigation & Menu Animation Principles

Apply Disney's 12 principles to navigation for fluid, intuitive wayfinding.

Principles Applied to Navigation

1. Squash & Stretch

Menu items can compress slightly on click. Mobile hamburger icon lines should squash during transformation to X.

2. Anticipation

Before dropdown opens, trigger item can lift or highlight. Sidebar toggle icon rotates slightly before panel slides.

3. Staging

Active nav item should be clearly distinguished. Dropdown menus appear above other content via z-index and shadow. Focus hierarchy matters.

4. Straight Ahead & Pose to Pose

Define clear states: closed, opening, open, closing. Each menu item has default, hover, active, selected poses.

5. Follow Through & Overlapping Action

Dropdown items stagger in (20-30ms delay each). Submenu arrows rotate after text settles. Active indicator slides with slight overshoot.

6. Ease In & Ease Out

Menu open: ease-out. Menu close: ease-in. Hover transitions: ease-in-out. cubic-bezier(0.4, 0, 0.2, 1) for Material-style.

7. Arcs

Mobile nav sliding in from side should have slight arc. Menu indicator sliding between items can follow subtle curve path.

8. Secondary Action

While dropdown expands (primary), shadow grows (secondary), parent item stays highlighted (tertiary). Chevron rotates.

9. Timing

  • Dropdown open: 200-250ms
  • Dropdown close: 150-200ms
  • Hover highlight: 100-150ms
  • Active indicator slide: 200-300ms
  • Stagger per item: 20-40ms
  • Hamburger morph: 300ms

10. Exaggeration

Active indicator can overshoot and bounce back. Important nav items can pulse briefly for attention. Mega menus deserve bold entrances.

11. Solid Drawing

Maintain consistent spacing during animations. Shadows should be consistent. Icons should stay crisp at all animation frames.

12. Appeal

Smooth nav feels professional. Snappy responses build confidence. Navigation is used constantly, so invest in these micro-interactions.

CSS Implementation

css
.nav-dropdown {  transform-origin: top;  transition: transform 200ms ease-out,              opacity 200ms ease-out;}
.nav-dropdown.open {  transform: scaleY(1);  opacity: 1;}
.nav-indicator {  transition: transform 250ms cubic-bezier(0.4, 0, 0.2, 1);}

Key Properties

  • transform: translateX/Y, scaleY, rotate
  • opacity: fade menus
  • height/max-height: accordion menus
  • clip-path: reveal effects
  • transform-origin: dropdown direction

來源與署名

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

授權條款: 無授權條款

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

檢舉或申請下架