# Chromatic Aberration Wipe

An ultra-fast slide transition with an RGB glitch on the peak frames.

> 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/chromatic-aberration-wipe
```

<Step>Copy and paste the following code into your project.</Step>

<Step>Update the import paths to match your project setup.</Step>

## Usage

```tsx
import { ChromaticAberrationWipe } from "@/components/framecn/chromatic-aberration-wipe";
```

```tsx
<ChromaticAberrationWipe />
```

## API Reference

### ChromaticAberrationWipe

| Prop                 | Type                | Default   |
| -------------------- | ------------------- | --------- |
| `from`               | `ReactNode`         | `-`       |
| `to`                 | `ReactNode`         | `-`       |
| `direction`          | `"left" \| "right"` | `"left"`  |
| `transitionStart`    | `number`            | `36`      |
| `transitionDuration` | `number`            | `7`       |
| `aberrationOffset`   | `number`            | `8`       |
| `speed`              | `number`            | `1`       |
| `fps`                | `number`            | `30`      |
| `durationInFrames`   | `number`            | `90`      |
| `width`              | `number`            | `1280`    |
| `height`             | `number`            | `720`     |
| `background`         | `string`            | `"black"` |
| `className`          | `string`            | `-`       |

## Notes

  The RGB channels split and offset during the peak of the transition, creating
  a glitch effect. The intensity controls the offset amount.