Buttons
Expanding icon pill
Expanding icon pill: A round icon button that grows into a labelled pill on hover or focus, turning its glyph a full revolution as the label slides in.
Using Expanding icon pill
Expanding icon pill 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 |
|---|---|---|---|
label | text | Edit | Up to 18 characters |
accent | color | #FF4545 | No additional limit in the metadata. |
collapsed | number | 40 | From 28 to 64; step 2 |
expanded | number | 120 | From 80 to 220; step 5 |
spin | boolean | true | No additional limit in the metadata. |
Which frameworks are available for Expanding icon pill?
Expanding icon pill 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 Expanding icon pill depend on?
The React metadata lists these npm dependencies beyond React: motion, clsx.
What accessibility details are visible in Expanding icon pill?
The React source for Expanding icon pill includes: attributes and handlers (aria-hidden, aria-label). These are source observations. Verify accessible names, focus order and keyboard behavior in the composed page.
How does Expanding icon pill handle reduced motion?
Expanding icon pill reads the motion preference in its React source through useReducedMotion(). Preference-dependent expressions in index.tsx: rotate: spin && !prefersReducedMotion ? (open ? 360 : 0) : 0. Check the full implementation, shared styles and selected port with reduced motion enabled; these observations do not establish that every animation stops.