# Tab switch: Diagram element for AI agents

> The tab bar indicator slides from tab to tab and the content swaps with it, ending on the last tab.

Canonical page: https://agentframes.ai/elements/launchkit/tab-switch/
Markdown: https://agentframes.ai/elements/launchkit/tab-switch.md

## Overview

- Name: Tab switch (`tabSwitch`), an element: one HyperFrames block per size
- Part of: the [Launchkit](https://agentframes.ai/packs/launchkit.md) pack (46 of 50). Available only through the All-access subscription.
- Category: Diagram
- Purpose: The tab bar indicator slides from tab to tab and the content swaps with it, ending on the last tab.
- Pack: [Launchkit](https://agentframes.ai/packs/launchkit.md), included in All-access (from $14/month billed annually ($168/year), or $19 monthly)
- Subscribe: POST https://agentframes.ai/api/checkout/subscribe with interval=month or interval=year (optional currency=USD|GBP|EUR|AUD|CAD; 303 redirect to Stripe checkout; a human pays there). Then download any pack with the subscriber key: https://agentframes.ai/account.md
- Aspects: 16:9 (native), 9:16 (native), 4:5 (native), 1:1 (native)
- Canvases: works on Midnight · Ion (`ion`), Midnight · Aurora (`aurora`), Midnight · Ember (`ember`), Paper · Signal (`signal`), Paper · Cobalt (`cobalt`), Paper · Moss (`moss`); avoid none
- Typical duration: 5s
- Speaker-safe: no
- Preview video (watermarked): https://agentframes.ai/media/launchkit/tab-switch.mp4
- Poster: https://agentframes.ai/media/launchkit/tab-switch.jpg
- Licence: [AgentFrames Licence](https://agentframes.ai/licence.md)

## Paste this into Claude Code

```text
Use the AgentFrames Launchkit pack. Add a `tabSwitch` beat to plan.json on a `ion` canvas with slots `eyebrow`, `title` and `tabs` from my script. Then run validate → build → qa and show me qa/contact.jpg.
```

## Variables

| Variable | Type | Label | Description | Default |
|---|---|---|---|---|
| `eyebrow` | string | eyebrow | {"type":"string","minLength":0,"maxLength":32} | One app |
| `title` | string | title | {"type":"string","minLength":1,"maxLength":40} | Inbox, drafts and reports. |
| `tabs` | string | tabs | {"type":"array","minItems":2,"maxItems":3,"items":{"type":"object","properties":{"label":{"type":"string","minLength":1,"maxLength":12},"rows":{"type":"array","minItems":2,"maxItems":3,"items":{"type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":30},"meta":{"type":"string","minLength":0,"maxLength":14},"badge":{"type":"string","minLength":0,"maxLength":12},"icon":{"type":"string","enum":["spark","share","card","chart","bolt","check","chat","doc","user","globe","lock","clock","send","plus","mic","clip","search","cart","gift","rocket","heart"]}},"required":["title"]}}},"required":["label","rows"]}} | [{"label":"Inbox","rows":[{"title":"Refund for order #2041","meta":"09:12","badge":"Drafted","icon":"chat"},{"title":"Partnership intro","meta":"09:30","badge":"Drafted","icon":"user"},{"title":"Invoice overdue","meta":"10:04","icon":"card"}]},{"label":"Drafts","rows":[{"title":"Re: Refund for #2041","meta":"ready","icon":"spark"},{"title":"Re: Plan change","meta":"ready","icon":"spark"}]},{"label":"Reports","rows":[{"title":"Hours saved","meta":"14.5 h","icon":"chart"},{"title":"Avg reply time","meta":"9 min","icon":"clock"}]}] |

## What your agent can change

Tab switch · pilot role: Product areas. The tab bar indicator slides from tab to tab and the content swaps with it, ending on the last tab.

Native 1920×1080, 5s at 30 fps. Graphics only (no footage). Use the matching aspect variant; never stretch another size.

### Mount
Copy every manifest file path→target, plus `af-launchkit-runtime`. Mount with a unique host id, `data-composition-id="af-launchkit-tab-switch-16x9"`, `data-composition-src="compositions/af-launchkit-tab-switch-16x9.html"` and `data-variable-values` (JSON object). The starter projects already contain everything.

### Slots (content)
- `eyebrow`: {"type":"string","minLength":0,"maxLength":32}
- `title`: {"type":"string","minLength":1,"maxLength":40}
- `tabs`: JSON string; {"type":"array","minItems":2,"maxItems":3,"items":{"type":"object","properties":{"label":{"type":"string","minLength":1,"maxLength":12},"rows":{"type":"array","minItems":2,"maxItems":3,"items":{"type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":30},"meta":{"type":"string","minLength":0,"maxLength":14},"badge":{"type":"string","minLength":0,"maxLength":12},"icon":{"type":"string","enum":["spark","share","card","chart","bolt","check","chat","doc","user","globe","lock","clock","send","plus","mic","clip","search","cart","gift","rocket","heart"]}},"required":["title"]}}},"required":["label","rows"]}}

Nested slots are JSON strings inside `data-variable-values`. UI blocks (`panel`, `checkout`) use the ui.json block shapes in docs/UI-SCHEMA.md; `{"type":"shot","src":"data:image/png;base64,..."}` puts a screenshot in the window instead of rebuilt UI.

### Style
`brandName` (1-28), `logo` (empty → monogram app icon, or an inline base64 image), `look` (midnight | paper), `colourway` (midnight: ion, aurora, ember · paper: signal, cobalt, moss), `accent` (empty or #RRGGBB, overrides the colourway accent), `timeOffset` (seconds; Paper's corner timecode continues across a film).

Headline syntax: `\n` breaks a line. `*word*` is the accent (serif italic in Paper, accent colour in Midnight). A Midnight headline with two lines and no `*accent*` colours its last line (two-tone).

### Limits and errors
Out-of-range input stops the block with a message on `data-launchkit-error` and in the console (for example "slots.steps has 5 items; supported: 2-4"). Copy that is within the character limits but still too wide or tall for this size is also refused ("does not fit the 16x9 layout"), never shrunk. Everything has landed by 3.0s; the last 0.4 s is the outro.

Source: editable HTML + local GSAP and fonts. Deterministic (no randomness, no clock). See the pack LICENCE.md, NOTICE and TRADEMARKS.md.

## FAQ

### What can my AI agent change in Tab switch?

Your agent fills the `eyebrow`, `title` and `tabs` slots through the block's data-variable-values (or the starter project's variables). Motion, timing, palette, fonts and the internal layout are protected, so the result keeps the Launchkit look.

### Which aspect ratios does Tab switch support?

Tab switch is designed natively for 16:9, 9:16, 4:5 and 1:1. A typical beat lasts 5s.

### How do I get Tab switch?

Tab switch is included in the Launchkit pack, which is part of the AgentFrames All-access subscription along with 49 other templates in this pack and every other pack on the store. You get the full source, the editing contracts and the agent instructions.

## More in Launchkit

- [How it works](https://agentframes.ai/elements/launchkit/how-it-works.md): 2-4 numbered step cards joined by drawn connectors; horizontal in 16:9, vertical in 9:16, 4:5 and 1:1.
- [Workflow loop](https://agentframes.ai/elements/launchkit/workflow-loop.md): 3-5 stages around the product with directional arcs; a signal travels the loop once and lands.
- [Integrations orbit](https://agentframes.ai/elements/launchkit/integrations-orbit.md): The product card at the centre; 3-8 integration tiles (cleared logos or text) turn into place on spokes.
- [Plan picker](https://agentframes.ai/elements/launchkit/plan-picker.md): A who-is-it-for question branches to 2-3 plan cards; the cursor picks the best fit and the rest dim.

## Community

Coming soon.
