Carousels Sliders

dylantarre/animation-principles/skills/07-by-ui-element/carousels-sliders

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

Use when animating carousels, sliders, image galleries, or horizontally scrolling content for smooth navigation

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

將迪士尼十二項動畫原則套用於輪播、滑桿與圖片藝廊,並提供 CSS 時間與緩動建議。

功能
此技能為輪播、滑桿、圖片藝廊與橫向捲動內容的動畫提供設計指引。它把迪士尼十二項動畫原則逐條對應到輪播行為,例如切換前的預備動作、吸附後的輕微過衝,以及當前投影片的突出呈現。它也提供 CSS 程式碼片段,涵蓋軌道轉場、非作用中投影片縮放、分頁圓點與捲動吸附,並給出轉場、自動播放與游標停留暫停的建議時間。
適用情境
在建立或調整輪播、滑桿或橫向捲動藝廊的動態效果時使用。它適合用來選擇緩動曲線、持續時間與吸附行為,讓導覽感覺順暢且可預期。它只是指引說明,並非元件庫或可執行程式碼。
執行需求
不需要任何工具、套件或憑證;此技能僅為說明文件,不附帶指令碼。套用其中的 CSS 需要一個包含 HTML 與 CSS 的專案。

Carousel & Slider Animation Principles

Apply Disney's 12 principles to carousels and sliders for smooth, intuitive navigation.

Principles Applied to Carousels

1. Squash & Stretch

Slides can slightly compress in scroll direction during fast swipes. Expands perception of speed and momentum.

2. Anticipation

Before slide change, current slide can shift 5-10px in direction of navigation. Button can depress before triggering.

3. Staging

Current/active slide should be prominently displayed: larger, centered, more opaque. Adjacent slides can be dimmed or scaled down.

4. Straight Ahead & Pose to Pose

Use pose-to-pose: define exact positions for each slide. Snap points should be clear and predictable.

5. Follow Through & Overlapping Action

After snap, slide can overshoot slightly and settle back. Content within slide (text, buttons) lags behind container movement.

6. Ease In & Ease Out

Swipe release: ease-out (momentum slowdown). Button navigation: ease-in-out. cubic-bezier(0.25, 0.1, 0.25, 1) for smooth slides.

7. Arcs

3D carousels should rotate slides along curved paths. Coverflow effects follow arc naturally. Even flat carousels can have subtle Y movement.

8. Secondary Action

While slide moves (primary), pagination updates (secondary), adjacent slides scale/fade (tertiary), progress bar moves (quaternary).

9. Timing

  • Slide transition: 300-500ms
  • Swipe momentum: 200-400ms
  • Pagination dot: 150ms
  • Autoplay interval: 4000-6000ms
  • Pause on hover: immediate
  • Adjacent slide scale: 250ms

10. Exaggeration

Hero carousels can use more dramatic transitions. Product carousels should be smoother, less distracting. Scale to context.

11. Solid Drawing

Maintain consistent slide dimensions. Gaps should stay uniform. Aspect ratios must be preserved during any transforms.

12. Appeal

Smooth carousels feel premium. Janky sliders feel cheap. Touch response should feel native. Investment here pays dividends.

CSS Implementation

css
.carousel-track {  display: flex;  transition: transform 400ms cubic-bezier(0.25, 0.1, 0.25, 1);}
.carousel-slide {  flex-shrink: 0;  transition: transform 300ms ease-out,              opacity 300ms ease-out;}
.carousel-slide:not(.active) {  transform: scale(0.9);  opacity: 0.6;}
.pagination-dot {  transition: transform 150ms ease-out,              background-color 150ms ease-out;}
.pagination-dot.active {  transform: scale(1.3);}
/* CSS scroll snap */.carousel-container {  scroll-snap-type: x mandatory;  scroll-behavior: smooth;}
.carousel-slide {  scroll-snap-align: center;}

Key Properties

  • transform: translateX, scale
  • opacity: inactive slides
  • scroll-snap-type: native snapping
  • scroll-behavior: smooth scrolling
  • transition: slide movements

來源與署名

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

授權條款: 無授權條款

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

檢舉或申請下架