Atelier UI

搜索组件…

搜索组件…

Magnetic Button

磁吸按钮:指针靠近时按钮跟随移动,离开后弹性回位。

在沙盒中编辑

复制一段给 AI 编程工具的提示词,包含源码、依赖和用法

属性

MagneticButtonProps

同时支持以下类型的全部属性: React.ComponentProps<"button">

属性类型默认值说明
strengthnumber0.350-1, how far the button follows the cursor

安装

$ npx shadcn@latest add https://chromotion.dev/r/magnetic-button.json

同类组件