# Shared-Layout Tab Switch

https://fieldbook.lizardi.mx/components/shared-layout-tab-switch

Category: Navigation
![Still of the Shared-Layout Tab Switch component, a Fieldbook UI component in Navigation.](https://fieldbook.lizardi.mx/thumbs/shared-layout-tab-switch.webp)
Preview video: https://ejpqcxcjbiyabxkx.public.blob.vercel-storage.com/previews/shared-layout-tab-switch-94d8c0763b.mp4 (5 s, silent)

Shared-Layout Tab Switch: A row of plain text tabs where a solid pill background slides and resizes to match whichever tab is selected, using spring-driven shared-layout motion.

## 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 |
| --- | --- | --- | --- |
| selected | select | React | Options: Home, React, Vue, Svelte |
| accentColor | color | #FFFFFF | No additional limit in the metadata. |
| pillRadius | number | 9 | From 4 to 16; step 1 |

## Usage notes

Shared-Layout Tab Switch uses the inline preview frame with a dark theme setting.

### Which frameworks are available for Shared-Layout Tab Switch?

Shared-Layout Tab Switch 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 Shared-Layout Tab Switch depend on?

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

### What accessibility details are visible in Shared-Layout Tab Switch?

The React source for Shared-Layout Tab Switch includes: native elements (button); attributes and handlers (aria-hidden, aria-label, aria-orientation, aria-selected, onKeyDown, tabIndex); explicit roles (tab, tablist); key comparisons (ArrowLeft, ArrowRight, End, Home). These are source observations. Verify accessible names, focus order and keyboard behavior in the composed page.

### How does Shared-Layout Tab Switch handle reduced motion?

Shared-Layout Tab Switch reads the motion preference in its React source through useReducedMotion(). Preference-dependent expressions in index.tsx: spring: reduce ? \{ duration: 0 \} : \{ type: "spring", stiffness: 460, damping: 32, mass: 0.85 \}. 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": "shared-layout-tab-switch",
    "framework": "react"
  }
}
```

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

## Related open components

- [Segmented toggle tabs](https://fieldbook.lizardi.mx/components/segmented-toggle-tabs)
- [Sliding content tabs](https://fieldbook.lizardi.mx/components/sliding-content-tabs)
- [Sliding Panel Tabs](https://fieldbook.lizardi.mx/components/sliding-panel-tabs)
- [Auto height tabs](https://fieldbook.lizardi.mx/components/auto-height-tabs)
- [Bubble burst menu](https://fieldbook.lizardi.mx/components/bubble-burst-menu)
- [Card blur tabs](https://fieldbook.lizardi.mx/components/card-blur-tabs)
