# Template Element

## 1. Shape

```ts
interface TemplateClip extends BaseClip {
  type: "template";
  template: string;
  variant?: string;
  version?: string;
  data: Record<string, unknown>;
  overrides?: {
    data?: Record<string, unknown>;
    style?: Style;
    transition?: Transition;
    zIndexOffset?: number;
  };
}
```

## 2. Supported template names

Current documented names:
- `product-intro`
- `slideshow`
- `subtitle-video`
- `talking-head`
- `comparison`
- `countdown`
- `text-reveal`
- `news`
- `quote`
- `list`

## 3. Runtime boundary

`template` clips expand into normal clips at runtime. The exact generated structure depends on the selected template and its `data`.

Template-level inheritance of `transform`, `style`, `animations`, `keyframes`, or `transition` is not documented as a stable child-clip behavior.

Use `variant` to select registered defaults for a template. Use `overrides` to merge final `data`, apply style to generated non-audio clips, add a default transition, or offset generated `zIndex` values.

## 4. Example

```json
{
  "type": "template",
  "template": "talking-head",
  "start": 0,
  "duration": 6,
  "data": {
    "src": { "$ref": "host" },
    "words": { "$ref": "sub-main" },
    "title": "Weekly Update",
    "speaker": "Alex Chen",
    "role": "Founder",
    "showLowerThird": true
  }
}
```