# Spring layout toggle

https://fieldbook.lizardi.mx/components/spring-layout-toggle

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

Spring layout toggle: A switch whose knob is aligned to one end of the track by layout alone and springs between the two measured positions whenever the state flips.

## 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 |
| --- | --- | --- | --- |
| on | boolean | false | No additional limit in the metadata. |
| bounce | number | 0.3 | From 0 to 0.7; step 0.05 |
| size | number | 50 | From 36 to 72; step 2 |
| label | text | Focus mode | Up to 24 characters |
| accent | color | #9BE15D | No additional limit in the metadata. |

## Usage notes

Spring layout toggle uses the inline preview frame with a light/dark theme setting.

### Which frameworks are available for Spring layout toggle?

Spring layout 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 Spring layout toggle depend on?

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

### What accessibility details are visible in Spring layout toggle?

The React source for Spring layout toggle includes: attributes and handlers (aria-checked, aria-hidden, aria-label); explicit roles (switch). These are source observations. Verify accessible names, focus order and keyboard behavior in the composed page.

### How does Spring layout toggle handle reduced motion?

Spring layout toggle reads the motion preference in its React source through useReducedMotion(). Preference-dependent expressions in index.tsx: faceTransition: reduced ? \{ duration: 0.15 \} : \{ duration: 0.55, times: \[0, 0.35, 1\], ease: "easeOut" as const \}; travelTransition: reduced ? \{ duration: 0.18, ease: "linear" as const \} : \{ type: "spring" as const, bounce, duration: 0.5 \}. 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": "spring-layout-toggle",
    "framework": "react"
  }
}
```

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

## Related open components

- [Icon crossfade switch](https://fieldbook.lizardi.mx/components/icon-crossfade-switch)
- [Latching square toggle](https://fieldbook.lizardi.mx/components/latching-square-toggle)
- [Settings Toggle Row](https://fieldbook.lizardi.mx/components/press-stretch-switch)
- [Sliding Thumb Switch](https://fieldbook.lizardi.mx/components/sliding-thumb-switch)
- [Character budget counter](https://fieldbook.lizardi.mx/components/character-budget-counter)
- [Check draw toggle](https://fieldbook.lizardi.mx/components/check-draw-toggle)
