# Expanding icon pill

https://fieldbook.lizardi.mx/components/expanding-icon-pill

Category: Buttons
![Still of the Expanding icon pill component, a Fieldbook UI component in Buttons.](https://fieldbook.lizardi.mx/thumbs/expanding-icon-pill.webp)
Preview video: https://ejpqcxcjbiyabxkx.public.blob.vercel-storage.com/previews/expanding-icon-pill-ad8a134e5c.mp4 (5 s, silent)

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.

## Frameworks

react, vue, svelte, astro, html

## Preview controls

These controls are passed to the demo. Defaults and limits describe the preview; consult the implementation for its full prop API.

| Name | Type | Default | Options or constraints |
| --- | --- | --- | --- |
| 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. |

## Usage notes

Expanding icon pill uses the inline preview frame with a light/dark theme setting.

### 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 &amp;&amp; !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.

## Install through MCP

Connect your client, call get_component to retrieve the implementation, then get_install_command for installation instructions. Choose a listed framework, integrate the returned source and verify it in your application.

```json
{
  "tool": "get_component",
  "arguments": {
    "slug": "expanding-icon-pill",
    "framework": "react"
  }
}
```

[For agents](https://fieldbook.lizardi.mx/docs/agents)
[MCP](https://fieldbook.lizardi.mx/api/mcp)

## Related open components

- [Arrow to label pill](https://fieldbook.lizardi.mx/components/arrow-to-label-pill)
- [Expanding icon pill](https://fieldbook.lizardi.mx/components/expanding-icon-pill-2)
- [Amber upload pill](https://fieldbook.lizardi.mx/components/amber-upload-pill)
- [Bevel press pill](https://fieldbook.lizardi.mx/components/bevel-press-pill)
- [Dark Pill Sign In](https://fieldbook.lizardi.mx/components/dark-pill-sign-in-button)
- [Draining fill button](https://fieldbook.lizardi.mx/components/draining-fill-button-2)
