Buttons Ctas

dylantarre/animation-principles/skills/07-by-ui-element/buttons-ctas

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

Use when animating buttons, CTAs, or clickable action elements to create satisfying, responsive interactions

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

提供使用迪士尼12项动画原则为按钮和CTA添加动画的指导,并附CSS示例。

功能
该技能为按钮、CTA和可点击操作元素的动画提供设计指导。它将迪士尼的12项动画原则映射到悬停、按下、聚焦和禁用等按钮状态,并给出时间建议以及针对变换、阴影和颜色过渡的CSS代码片段。其产出是指导性内容,而非生成的文件或代码产物。
适用场景
适用于设计或优化交互式按钮和CTA动画,使其感觉灵敏且令人满意。适合需要具体时间与缓动指导的前端或设计工作,用于处理悬停、按下和状态过渡。
运行要求
无需脚本或特殊工具,仅为说明性内容。应用其中的CSS示例需要Web前端环境。

Button & CTA Animation Principles

Apply Disney's 12 principles to create buttons that feel alive and responsive.

Principles Applied to Buttons

1. Squash & Stretch

Scale buttons slightly on press: transform: scale(0.95) on :active, return to scale(1) on release. Creates tactile feedback.

2. Anticipation

Subtle hover lift before click: transform: translateY(-2px) prepares users for the action.

3. Staging

Primary CTAs should be visually prominent. Use size, color contrast, and whitespace. Animate primary buttons more boldly than secondary.

4. Straight Ahead & Pose to Pose

Use pose-to-pose for button states: define clear keyframes for default, hover, active, and disabled states.

5. Follow Through & Overlapping Action

After click, let shadows or glows settle slightly after the button returns. Icon inside can lag 20-50ms behind button movement.

6. Ease In & Ease Out

Never use linear timing. Use ease-out for hover-in (fast start), ease-in for hover-out (gentle exit). cubic-bezier(0.4, 0, 0.2, 1) works well.

7. Arcs

Floating action buttons should move in arcs when repositioning. Use transform with easing rather than straight-line movement.

8. Secondary Action

Ripple effects, icon rotations, or shadow changes accompany the primary scale/color change. Don't let secondary actions overpower.

9. Timing

  • Hover: 150-200ms
  • Active/press: 50-100ms (snappy)
  • Focus ring: 150ms
  • Loading state transition: 200-300ms

10. Exaggeration

Success buttons can briefly scale to 1.05 before settling. Error states can include subtle shake (3-5px, 2-3 cycles).

11. Solid Drawing

Maintain consistent border-radius and proportions across states. Shadows should respect light source direction throughout.

12. Appeal

Round corners feel friendly, sharp corners feel professional. Match button personality to brand. Satisfying click feedback increases conversions.

CSS Implementation

css
.btn {  transition: transform 150ms ease-out,              box-shadow 150ms ease-out,              background-color 150ms ease-out;}
.btn:hover {  transform: translateY(-2px);  box-shadow: 0 4px 12px rgba(0,0,0,0.15);}
.btn:active {  transform: scale(0.97) translateY(0);  transition-duration: 50ms;}

Key Properties

  • transform: scale, translate
  • box-shadow: depth changes
  • background-color: state indication
  • opacity: disabled states
  • filter: brightness on hover

来源与署名

来源:dylantarre/animation-principles位于skills/07-by-ui-element/buttons-ctas提交8359713

许可证: 无许可证

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

举报或申请下架