# Expanding icon pill

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

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

Expanding icon pill: A round icon button that stretches into a labelled pill on hover, trading its glyph for a word as an accent fill arrives.

## 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 | Home | Up to 14 characters |
| accent | color | #7C5CFF | No additional limit in the metadata. |
| collapsed | number | 60 | From 40 to 88; step 2 |
| expanded | number | 180 | From 120 to 260; step 4 |
| cast | boolean | true | No additional limit in the metadata. |

## Usage notes

Expanding icon pill uses the inline preview frame with a light 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: native elements (button); attributes and handlers (aria-hidden). 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: gap: reduced ? 0 : 250; stretch: reduced ? 280 : 520; swap: reduced ? 1 : 190. 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-2",
    "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)
- [Overshoot icon button](https://fieldbook.lizardi.mx/components/overshoot-icon-slide-button)
- [Rocking icon CTA](https://fieldbook.lizardi.mx/components/rocking-icon-cta)
- [Staged expand delete button](https://fieldbook.lizardi.mx/components/staged-expand-delete-button)
- [Amber upload pill](https://fieldbook.lizardi.mx/components/amber-upload-pill)
- [Draining fill button](https://fieldbook.lizardi.mx/components/draining-fill-button-2)
