Pull Button
buttonProA button that leans toward the cursor from a distance and springs back, with a colour fill that wipes in from the exact entry point and out toward the exit point.
Introductory price until 31 December 2026. €79 after that.
Preview
Live demo. The theme switches the demo itself.
Code
The code is locked
Pull Button is part of Manniche UI Pro. A key unlocks the source of all 66 effects.
Buy · €49€49 · Introductory price until 31 December 2026. €79 after that.
- One-off payment
- One developer
- Sign in and create your key straight away
- No VAT (§ 19 UStG)
Have a key? Get the code with the CLI or MCP.
The key lives in MANNICHE_PRO_KEY, never in your code or a URL. How to set it up
npx shadcn@latest add @manniche-pro/pull-buttonclaude mcp add --transport http manniche-ui https://mikkelmanniche.dk/api/mcp --header "Authorization: Bearer $MANNICHE_PRO_KEY"Props
PullButtonProps
| Prop | Type | Default | What it does |
|---|---|---|---|
ref | Ref<HTMLButtonElement> | – | Ref to the real <button>. |
range | number | 90 | How far from the button (px, measured from its edge) the cursor starts to pull it. 0 turns the magnet off. |
strength | number | 0.35 | How much of the cursor offset the button follows, 0 to 1. Around 0.3 feels firm, 0.6 is loose. |
color | string | 'var(--color-foreground)' | Resting background. Any CSS colour or var(). Defaults to the foreground token. |
textColor | string | 'var(--color-background)' | Text colour at rest. Defaults to the background token. |
fillColor | string | 'var(--color-primary)' | Colour that wipes in on hover. Defaults to the primary token. |
fillTextColor | string | 'var(--color-primary-foreground)' | Text colour on the wipe. Defaults to the primary-foreground token. |
borderWidth | number | 0 | Border width in px; 0 for none. |
borderColor | string | – | Border colour. Defaults to fillColor, so a bordered button keeps a rim while the fill passes. |
duration | number | 480 | Length of the wipe in milliseconds. |
Also takes every prop from ButtonHTMLAttributes<HTMLButtonElement>.
A11y
Keyboard
Enter and Space click the button. The magnetic pull follows mouse and pen only.
Screen reader
children is rendered once. The label copy used for the fill wipe is a clone that is inert and aria-hidden, with ids and names removed, so the button has one name and no duplicate ids.
Reduced motion
Under reduced motion the magnet is off and the fill wipe stays.