Pull Button
buttonProEn knap, der læner sig mod markøren på afstand og fjedrer tilbage, med en farvefyldning, der løber ind fra det præcise indgangspunkt og ud mod udgangspunktet.
Introduktionspris til og med 31. december 2026. Derefter 79 €.
Preview
Live demo. Temaet skifter selve demoen.
Kode
Koden er låst
Pull Button er en del af Manniche UI Pro. En nøgle åbner kildekoden til alle 66 effekter.
Køb · 49 €49 € · Introduktionspris til og med 31. december 2026. Derefter 79 €.
- Engangsbetaling
- Én udvikler
- Log ind og opret din nøgle med det samme
- Ingen moms (§ 19 UStG)
Har du en nøgle? Hent koden med CLI eller MCP.
Nøglen ligger i MANNICHE_PRO_KEY, aldrig i koden eller i adressen. Sådan sætter du den op
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 | Standard | Hvad den gør |
|---|---|---|---|
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. |
Tager også alle props fra ButtonHTMLAttributes<HTMLButtonElement>.
A11y
Tastatur
Enter and Space click the button. The magnetic pull follows mouse and pen only.
Skærmlæser
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.
Mindre bevægelse
Under reduced motion the magnet is off and the fill wipe stays.