Buttons
Snap back icon button
Snap back icon button: A bare glyph button that grows smoothly under the pointer and snaps back to its resting size the instant it is pressed.
Using Snap back icon button
Snap back icon button uses the inline preview frame with a light/dark theme setting.
Customize the preview
These controls are passed to the demo. Defaults and limits describe the preview; consult the implementation for its full prop API.
| Control | Type | Default | Preview limits |
|---|---|---|---|
accent | color | #38BDF8 | No additional limit in the metadata. |
label | text | Attach | Up to 20 characters |
size | number | 44 | From 24 to 72; step 2 |
hoverScale | number | 1.25 | From 1 to 1.8; step 0.05 |
strokeWidth | number | 1.5 | From 1 to 3; step 0.25 |
Which frameworks are available for Snap back icon button?
Snap back icon button is available for React, Vue, Svelte, Astro, HTML. The live preview uses React; the source observations below apply to index.tsx. Check the selected port before relying on the same interactions.
What does Snap back icon button depend on?
The React metadata lists these npm dependencies beyond React: motion.
What accessibility details are visible in Snap back icon button?
The React source for Snap back icon button includes: native elements (button); attributes and handlers (aria-hidden, aria-label, onKeyDown, onKeyUp); key comparisons (Enter, Space). These are source observations. Verify accessible names, focus order and keyboard behavior in the composed page.
How does Snap back icon button handle reduced motion?
Snap back icon button reads the motion preference in its React source through useReducedMotion(). Preference-dependent expressions in index.tsx: reduced && phase === "hover" ? `color-mix(in oklab, ${accent} 75%, white)` : accent; scale: !reduced && phase === "hover" ? hoverScale : 1. Check the full implementation, shared styles and selected port with reduced motion enabled; these observations do not establish that every animation stops.