# Parallax Layers

Two depth layers — large translucent italic text behind, clean text in front.

> For the complete documentation index, see [llms.txt](/llms.txt). Markdown variants are available by appending `.md` to any URL or sending an `Accept: text/markdown` header. An agent skill is available at [/.well-known/agent-skills/site-skill.md](/.well-known/agent-skills/site-skill.md).

## Installation

<TabsTrigger value="cli">Command</TabsTrigger>
<TabsTrigger value="manual">Manual</TabsTrigger>

```bash
npx shadcn@latest add @framecn/caption-parallax-layers
```

  <Step>Copy and paste the following code into your project.</Step>
  <ComponentSource
    name="parallax-layers"
    title="components/ui/caption-parallax-layers.tsx"
  />
  <Step>Update the import paths to match your project setup.</Step>

## Usage

```tsx
import { CaptionParallaxLayers } from "@/components/framecn/caption-parallax-layers";
```

```tsx
<CaptionParallaxLayers />
```

## API Reference

### CaptionParallaxLayers

| Prop               | Type               | Default      |
| ------------------ | ------------------ | ------------ |
| `words`            | `CaptionWord[]`    | (demo words) |
| `color`            | `string`           | `"#ffffff"`  |
| `behindColor`      | `string`           | `"#a78bfa"`  |
| `fontSize`         | `number`           | `56`         |
| `fontWeight`       | `number \| string` | `700`        |
| `speed`            | `number`           | `1`          |
| `fps`              | `number`           | `30`         |
| `durationInFrames` | `number`           | `180`        |
| `width`            | `number`           | `1280`       |
| `height`           | `number`           | `720`        |
| `className`        | `string`           | `-`          |

## Notes

  The `start` and `end` fields on each `CaptionWord` are in seconds.