---
title: "Dia Text Animation"
description: "Free React text animation inspired by Dia: a fixed sentence with a final word that cycles, each revealed by a colorful sweep. Framer Motion, shadcn install."
category: "Components"
parent: "https://beui.dev/components/motion/text-animation"
publishedAt: "2026-05-17"
updatedAt: "2026-11-24"
documentation: "https://beui.dev/components/motion/text-animation/chromatic-reveal"
markdown: "https://beui.dev/components/motion/text-animation/chromatic-reveal.md"
license: "MIT"
---

# Dia Text Animation

> Free React text animation inspired by Dia: a fixed sentence with a final word that cycles, each revealed by a colorful sweep. Framer Motion, shadcn install.

## Install

```bash
npx shadcn@latest add @beui/chromatic-text-reveal
```

## Dependencies

- `clsx`
- `motion`
- `react`
- `tailwind-merge`

## Usage

### Dia Text Animation usage

A Dia-inspired text effect with a fixed sentence prefix and a cycling final word revealed by a colorful sweep.

```tsx
import { ChromaticTextReveal } from "@/components/motion/chromatic-text-reveal";

export function ChromaticTextRevealPreview() {
  return (
    // The sentence never wraps, so it has to be sized against the space it
    // actually gets — the surrounding column, not the viewport.
    <div className="@container flex w-full justify-center">
      <ChromaticTextReveal
        prefix="Motion that feels"
        words={["natural.", "intentional.", "alive."]}
        startOnView={false}
        className="shrink-0 font-medium tracking-[-0.04em] text-foreground [font-size:clamp(1.25rem,7.8cqw,3rem)]"
      />
    </div>
  );
}
```

## API Reference

### ChromaticTextReveal

| Prop | Type | Default | Required | Description |
| --- | --- | --- | --- | --- |
| `prefix` | `string` | — | Yes | Sentence fragment that remains fixed while the final word changes. |
| `words` | `string[]` | — | Yes | Words revealed one after another after the fixed prefix. |
| `colors` | `string[]` | `[ "#60a5fa", "#22d3ee", "#f472b6", "#fb7185", "#fbbf24", ]` | No | Colors used along the moving chromatic edge. |
| `foregroundColor` | `string` | `var(--foreground)` | No | Final text color after the sweep passes. |
| `duration` | `number` | `1.2` | No | Sweep duration in seconds. |
| `delay` | `number` | `0` | No | Delay before the first sweep, in seconds. |
| `pauseDuration` | `number` | `0.8` | No | Rest after a word finishes revealing, in seconds. |
| `loop` | `boolean` | `true` | No | Returns to the first word after the final word. |
| `startOnView` | `boolean` | `true` | No | Starts when the text enters the viewport. |
| `once` | `boolean` | `true` | No | Only starts on the first viewport entry. |
| `inViewMargin` | `MarginType` | — | No | IntersectionObserver root margin used by the viewport trigger. |
| `className` | `string` | — | No | Classes merged onto the root element. |

## More in Text Animation

- [Text Scramble](https://beui.dev/components/motion/text-animation/text-scramble.md)
- [Text Reveal](https://beui.dev/components/motion/text-animation/reveal.md)
- [Text Shimmer](https://beui.dev/components/motion/text-animation/shimmer.md)
- [Text Cascade](https://beui.dev/components/motion/text-animation/cascade.md)

## Source

- Registry detail: https://beui.dev/r/chromatic-text-reveal
- Raw source: https://beui.dev/r/chromatic-text-reveal/raw
- GitHub: https://github.com/starc007/ui-components
