Glass button
controlsProEn glaslinse i en affasning, der forstørrer alt bag sig, med en glans, der følger markøren, og et tryk på én pixel.
Introduktionspris til og med 31. december 2026. Derefter 79 €.
Preview
Live demo. Temaet skifter selve demoen.
Kode
Koden er låst
Glass 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/glass-buttonclaude mcp add --transport http manniche-ui https://mikkelmanniche.dk/api/mcp --header "Authorization: Bearer $MANNICHE_PRO_KEY"Props
GlassButtonProps
| Prop | Type | Standard | Hvad den gør |
|---|---|---|---|
backdrop | ReactNode | – | What sits behind the button, drawn in currentColor. It shows round the button in the muted colour and again, magnified, inside the lens. It is drawn twice, so keep it decorative: both copies are aria-hidden and inert. Leave it out for plain glass. |
backdropClassName | string | – | Classes for the backdrop layer, which is absolutely positioned in the wrapper. |
containerClassName | string | – | Classes for the wrapper round the backdrop and the button, e.g. flex w-full justify-center to give the backdrop room. |
magnify | number | 1.3 | How much the lens magnifies the backdrop. |
Tager også alle props fra ButtonHTMLAttributes<HTMLButtonElement>.
A11y
Tastatur
Enter and Space show the pressed state and click the button.
Skærmlæser
The backdrop copies and the lens are inert and aria-hidden. Only the real label is read, once.
Mindre bevægelse
Under reduced motion the moving highlight is hidden.