指南 / 动效

磁吸按钮

光标靠近时按钮被轻轻吸过去,移开再弹回,适合最重要的那个 CTA;满屏都用就廉价了。

在线演示

将指针移近

实现提示词

标准

Primary CTA with magnetic hover: button translates up to 8px toward the cursor and springs back on leave.

含动效

Magnetic CTA button: translates toward cursor (max 8px) with spring physics on release.
设计规范条目
### Magnetic Button (#magnetic-btn)

Category: Motion

Magnetic button: the button is gently pulled toward the cursor, springing back on leave. For the one primary CTA—everywhere cheapens it.

- Do: Primary CTA with magnetic hover: button translates up to 8px toward the cursor and springs back on leave

With motion: Magnetic CTA button: translates toward cursor (max 8px) with spring physics on release.

Live demo: https://uidesignmd.com/guides/magnetic-btn/

规范包

从所选指南中导出实现规则和链接。

已选指南 0 / 20