# Weight Shift

Font weight animates from 100 to 900 when each word is spoken, back to thin after.

> 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-weight-shift
```

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

## Usage

```tsx
import { CaptionWeightShift } from "@/components/framecn/caption-weight-shift";
```

```tsx
<CaptionWeightShift />
```

## API Reference

### CaptionWeightShift

| Prop               | Type            | Default                    |
| ------------------ | --------------- | -------------------------- |
| `words`            | `CaptionWord[]` | (demo words)               |
| `color`            | `string`        | `"#ffffff"`                |
| `activeColor`      | `string`        | `"#ffffff"`                |
| `dimColor`         | `string`        | `"rgba(255,255,255,0.35)"` |
| `fontSize`         | `number`        | `72`                       |
| `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.