重要前提
安装AI Skills的关键前提是:必须科学上网,且开启TUN模式,这一点至关重要,直接决定安装能否顺利完成,在此郑重提醒三遍:科学上网,科学上网,科学上网。查看完整安装教程 →
buttons-ctas by dylantarre/animation-principles
npx skills add https://github.com/dylantarre/animation-principles --skill buttons-ctas运用迪士尼的 12 条动画原则,创造富有生命感和响应性的按钮。
按下时轻微缩放按钮:在 :active 状态使用 transform: scale(0.95),释放时恢复到 scale(1)。创造触觉反馈。
点击前进行微妙的悬停上浮:transform: translateY(-2px) 让用户为即将发生的动作做好准备。
主要行动号召按钮应在视觉上突出。使用尺寸、颜色对比和留白。主要按钮的动画应比次要按钮更显著。
为按钮状态使用关键帧动画:为默认、悬停、激活和禁用状态定义清晰的关键帧。
点击后,在按钮返回原状时,让阴影或光晕效果稍作停留。按钮内部的图标可以比按钮运动滞后 20-50 毫秒。
切勿使用线性时序。悬停进入时使用 ease-out(快速开始),悬停退出时使用 ease-in(平缓退出)。 效果很好。
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
cubic-bezier(0.4, 0, 0.2, 1)浮动操作按钮在重新定位时应沿弧线移动。使用带有缓动效果的 transform 而非直线运动。
涟漪效果、图标旋转或阴影变化伴随主要的缩放/颜色变化。不要让次要动作喧宾夺主。
成功按钮在稳定前可以短暂缩放到 1.05。错误状态可以包含轻微的抖动(3-5 像素,2-3 个周期)。
在所有状态下保持一致的边框圆角和比例。阴影应始终遵循光源方向。
圆角感觉友好,锐角感觉专业。使按钮个性与品牌相匹配。令人满意的点击反馈能提高转化率。
.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;
}
transform: 缩放、平移box-shadow: 深度变化background-color: 状态指示opacity: 禁用状态filter: 悬停时的亮度变化每周安装量
64
代码仓库
GitHub 星标数
20
首次出现
2026 年 1 月 24 日
安全审计
安装于
cursor51
codex51
opencode49
gemini-cli48
github-copilot44
claude-code43
Apply Disney's 12 principles to create buttons that feel alive and responsive.
Scale buttons slightly on press: transform: scale(0.95) on :active, return to scale(1) on release. Creates tactile feedback.
Subtle hover lift before click: transform: translateY(-2px) prepares users for the action.
Primary CTAs should be visually prominent. Use size, color contrast, and whitespace. Animate primary buttons more boldly than secondary.
Use pose-to-pose for button states: define clear keyframes for default, hover, active, and disabled states.
After click, let shadows or glows settle slightly after the button returns. Icon inside can lag 20-50ms behind button movement.
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.
Floating action buttons should move in arcs when repositioning. Use transform with easing rather than straight-line movement.
Ripple effects, icon rotations, or shadow changes accompany the primary scale/color change. Don't let secondary actions overpower.
Success buttons can briefly scale to 1.05 before settling. Error states can include subtle shake (3-5px, 2-3 cycles).
Maintain consistent border-radius and proportions across states. Shadows should respect light source direction throughout.
Round corners feel friendly, sharp corners feel professional. Match button personality to brand. Satisfying click feedback increases conversions.
.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;
}
transform: scale, translatebox-shadow: depth changesbackground-color: state indicationopacity: disabled statesfilter: brightness on hoverWeekly Installs
64
Repository
GitHub Stars
20
First Seen
Jan 24, 2026
Security Audits
Gen Agent Trust HubPassSocketPassSnykPass
Installed on
cursor51
codex51
opencode49
gemini-cli48
github-copilot44
claude-code43
前端设计系统技能:生产级UI设计、设计令牌与可访问性指南
8,500 周安装