Sticky Button
Sticky Button: Magnetic cursor button pulled toward the pointer from a wide capture field with parallax tilt and depth. Free MIT React & Next.js source with Motion and Tailwind CSS, live preview, CLI install and docs.
Install Sticky Button
npx motion-ui-skill add sticky-buttonComponents install as source into your project. The interactive page also includes preview, code, documentation and install tabs.
Dependencies
clsxmotionreacttailwind-merge
Source files
Sticky Button
Magnetic cursor button pulled toward the pointer from a wide capture field with parallax tilt and depth.
Install
npx motion-ui-skill add sticky-button
Dependencies
clsxmotionreacttailwind-merge
Usage
"use client";
import { StickyButton } from "@/components/buttons/sticky-button";
export function StickyButtonDemo() {
return (
<div className="flex items-center justify-center p-6">
<StickyButton>Click Me</StickyButton>
</div>
);
}
API Reference
StickyButton
| Prop | Type | Default | Required | Description |
|---|---|---|---|---|
pullRadius |
number |
150 | No | Cursor magnetic attraction radius in pixels |
className |
string |
— | No | Additional CSS classes |
children |
React.ReactNode |
— | No | Button label content |