# Latching square toggle

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

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

Latching square toggle: A compact square icon button that latches between a faint outlined off state and a solid accent-filled pressed state.

## 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 |
| --- | --- | --- | --- |
| pressed | boolean | false | No additional limit in the metadata. |
| size | select | md | Options: sm, md, lg |
| disabled | boolean | false | No additional limit in the metadata. |
| accentColor | color | #9BE15D | No additional limit in the metadata. |

## Usage notes

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

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

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

The React metadata lists these npm dependencies beyond React: clsx.

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

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

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

The source scan found no direct useReducedMotion() or matchMedia preference read in Latching square toggle's index.tsx. 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-square-toggle",
    "framework": "react"
  }
}
```

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

## Related open components

- [Settings Toggle Row](https://fieldbook.lizardi.mx/components/press-stretch-switch)
- [Check draw toggle](https://fieldbook.lizardi.mx/components/check-draw-toggle)
- [Icon crossfade switch](https://fieldbook.lizardi.mx/components/icon-crossfade-switch)
- [Sliding Thumb Switch](https://fieldbook.lizardi.mx/components/sliding-thumb-switch)
- [Spring layout toggle](https://fieldbook.lizardi.mx/components/spring-layout-toggle)
- [Labeled toggle row](https://fieldbook.lizardi.mx/components/labeled-toggle-row)
