Attention Grabbers

dylantarre/animation-principles/skills/05-by-animation-type/attention-grabbers

作者 dylantarre83597134ba8f无许可证99 个星标收录于 2026年10月8日更新于 2026年10月8日仓库9个月前更新

Use when drawing user focus - notification badges, new feature highlights, error callouts, promotional banners, or any animation meant to attract attention.

仅含说明Design & Creative
AI 生成的概览

运用迪士尼十二项动画原则指导吸引注意力的界面动画,并给出时长表与 CSS 示例。

功能
该技能为界面中吸引用户注意力的动效提供指导,例如通知徽标、新功能高亮、错误提示和促销横幅。它把迪士尼十二项动画原则对应到注意力元素上,并提供时长建议、衰减规则以及脉冲、发光、抖动和摇铃的 CSS 关键帧示例。它还给出注意力预算,规定限制数量、自动停止和关闭注意力动画的规则。
适用场景
在添加或审查用于吸引用户注意力的动效时使用,例如徽标、通知圆点、错误抖动或促销高亮。它也适合用来确定这类动画的时长、循环次数和衰减行为。
运行要求
不需要脚本或工具,仅为说明性指令。应用其中的 CSS 与 JavaScript 示例需要支持 CSS 动画和 Web Animations API 的界面环境。

Attention-Grabbing Animations

Apply Disney's 12 principles to focus-drawing motion.

Principle Application

Squash & Stretch: Pulsing scale draws attention. 1.0 → 1.1 → 1.0 cycle catches peripheral vision.

Anticipation: Brief pause before attention animation. Let it build then release.

Staging: Position attention elements where users will see them. Corner badges, inline highlights.

Straight Ahead vs Pose-to-Pose: Design attention states: rest, active/pulsing, acknowledged.

Follow Through & Overlapping: Badge pulses, then count updates. Stagger the attention signals.

Slow In/Slow Out: Ease in/out on pulses. Smooth oscillation is less jarring than sharp bounces.

Arcs: Shake animations follow arc patterns. Left-right with slight vertical oscillation.

Secondary Action: Pulse + glow + color shift for maximum attention (use sparingly).

Timing:

  • Single attention grab: 300-500ms
  • Repeating pulse: 2000-3000ms cycle
  • Urgent pulse: 1000-1500ms cycle
  • Decay: Stop after 3-5 cycles or 10 seconds

Exaggeration: This is where exaggeration shines. Scale to 1.2, bright colors, bold motion.

Solid Drawing: Attention elements must still feel part of the UI, not floating or detached.

Appeal: Attention should feel like helpful notification, not aggressive demand.

Timing Recommendations

Attention TypeDurationCyclesDecay
Badge Pulse300ms2-3Stop after animation
Notification Dot2000ms36 seconds total
New Feature500ms2Stay subtle
Error Shake400ms1None
Urgent Alert1000msinfiniteUntil dismissed
Promotional3000ms26 seconds

Implementation Patterns

css
/* Pulse attention */.badge-pulse {  animation: pulse 2000ms ease-in-out 3;}
@keyframes pulse {  0%, 100% { transform: scale(1); }  50% { transform: scale(1.15); }}
/* Subtle glow */.glow-attention {  animation: glow 2000ms ease-in-out 3;}
@keyframes glow {  0%, 100% { box-shadow: 0 0 0 0 rgba(59, 130, 246, 0); }  50% { box-shadow: 0 0 0 8px rgba(59, 130, 246, 0.3); }}
/* Error shake */.shake {  animation: shake 400ms ease-in-out;}
@keyframes shake {  0%, 100% { transform: translateX(0); }  20%, 60% { transform: translateX(-8px); }  40%, 80% { transform: translateX(8px); }}
/* Ring animation (notification) */.ring {  animation: ring 2500ms ease-in-out 2;}
@keyframes ring {  0%, 100% { transform: rotate(0); }  10%, 30% { transform: rotate(10deg); }  20%, 40% { transform: rotate(-10deg); }  50%, 100% { transform: rotate(0); }}

Attention Budget

javascript
// Auto-stop attention after timeoutconst attention = element.animate([  { transform: 'scale(1)' },  { transform: 'scale(1.15)' },  { transform: 'scale(1)' }], {  duration: 2000,  iterations: 3});
// Or with CSSsetTimeout(() => {  element.classList.remove('attention');}, 6000);

Key Rules

  1. Maximum 1 attention animation visible at a time
  2. Auto-stop after 3-5 cycles (10 seconds max)
  3. Provide way to permanently dismiss
  4. Never use for non-essential content
  5. prefers-reduced-motion: static indicator only, no animation
  6. Urgent animations must have audio/haptic alternative for accessibility

来源与署名

来源:dylantarre/animation-principles位于skills/05-by-animation-type/attention-grabbers提交8359713

许可证: 无许可证

内容归原作者所有。SourceWeft 从公开仓库中收录这些内容。

举报或申请下架