# Latching icon toggle

https://fieldbook.lizardi.mx/components/latching-icon-toggle

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

Latching icon toggle: A square button that latches on and off: a filled plate fades in, the glyph swaps for its matched counterpart, and a caption beside it spells the state out in words.

## 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 |
| --- | --- | --- | --- |
| glyph | select | notifications | Options: notifications, sound, pin |
| startPressed | boolean | false | No additional limit in the metadata. |
| accent | color | #FF6A1F | No additional limit in the metadata. |
| size | number | 40 | From 28 to 56; step 2 |
| showCaption | boolean | true | No additional limit in the metadata. |

## Usage notes

Latching icon toggle uses the inline preview frame with a light/dark theme setting.

### Which frameworks are available for Latching icon toggle?

Latching icon toggle 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 Latching icon toggle depend on?

The React metadata lists these npm dependencies beyond React: motion, clsx, tailwind-merge.

### What accessibility details are visible in Latching icon toggle?

The React source for Latching icon toggle includes: attributes and handlers (aria-hidden, aria-label, aria-pressed). These are source observations. Verify accessible names, focus order and keyboard behavior in the composed page.

### How does Latching icon toggle handle reduced motion?

Latching icon toggle reads the motion preference in its React source through useReducedMotion(). Preference-dependent expressions in index.tsx: fadeTransition: calm ? \{ duration: 0 \} : \{ duration: 0.2, ease: \[0.2, 0.8, 0.2, 1\] as const \}; springTransition: calm ? \{ duration: 0 \} : \{ type: "spring" as const, stiffness: 460, damping: 28 \}. 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": "latching-icon-toggle",
    "framework": "react"
  }
}
```

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

## Related open components

- [Press plate toggle](https://fieldbook.lizardi.mx/components/press-plate-toggle)
- [Captioned Like Button](https://fieldbook.lizardi.mx/components/captioned-like-button)
- [Expanding disc mute toggle](https://fieldbook.lizardi.mx/components/expanding-disc-mute-toggle)
- [Pressable icon toggle](https://fieldbook.lizardi.mx/components/pressable-icon-toggle)
- [Channel tile row](https://fieldbook.lizardi.mx/components/channel-tile-row)
- [Chevron flip tile](https://fieldbook.lizardi.mx/components/chevron-flip-tile)
