# Scroll to Highlight

> Words light up as you scroll past them.

## Spec sheet

| | |
| --- | --- |
| Access | Free: no account, free for commercial use |
| Shelf | Text Animations › Entrances |
| Live preview | https://uibrik.com/components/scroll-highlight |
| Writes | 1 file into `components/uibrik/scroll-highlight/` |
| Packages | `motion` (the CLI installs them) |
| Needs | React 19, Tailwind CSS v4, a project set up with `npx shadcn@latest init` |
| Theme | Reads the shadcn tokens and follows class-based dark mode ([theming](https://uibrik.com/docs/theming.md)) |
| Updated | Nov 9, 2026 |

## Add it

```bash
npx shadcn@latest add https://uibrik.com/r/scroll-highlight.json
```

With the `@uibrik` namespace in `components.json` ([setup](https://uibrik.com/docs/installation.md)): `npx shadcn@latest add @uibrik/scroll-highlight`.

Can't run commands? https://uibrik.com/components/scroll-highlight/prompt.txt has every file verbatim, with the setup steps, ready for an assistant to write.

## Render it

Renders as is; every value shown is the default, so delete any line you don't need.

```tsx
import { ScrollHighlight } from "@/components/uibrik/scroll-highlight/scroll-highlight";

const text = "Scroll slowly. Each word waits in the dark until you reach it, then steps into the light.";

<ScrollHighlight
  play={0}
  text={text}
  scrollDuration={1.6}
  dim={0.2}
/>
```

## Tune it

The same props as the Customize panel on https://uibrik.com/components/scroll-highlight.

| Prop | Type | Default | What it does |
| --- | --- | --- | --- |
| `text` | `string` | `"Scroll slowly. Each word waits in the dark until you reach it, then steps into the light."` | The copy to animate. |
| `scrollDuration` | `number` | `1.6` | Replay scroll-through time. |
| `dim` | `number` | `0.2` | Opacity of words not yet reached. |

## Wire it

The props the Customize panel doesn't show: ranges, data, content and callbacks.

| Prop | Type | Default | What it does |
| --- | --- | --- | --- |
| `play` (required) | `number` |  | Each change plays the effect again; 0 shows its resting state. |

## Where it fits

- **Storytelling landing pages**: Words lighting up as you scroll past them pace a long statement.
- **Mission and manifesto sections**: Reading progress becomes visible as each word lights.
- **About pages**: Scroll-driven emphasis keeps readers moving through a paragraph. Pairs with [Highlighter](https://uibrik.com/components/highlighter.md).

## Same shelf: Entrances

- [Tracking In](https://uibrik.com/components/tracking-in.md): Lines open with a wide gap after every letter, and the gaps close one by one until the text settles.
- [Typewriter](https://uibrik.com/components/typewriter.md): Text typed with a human rhythm, mistakes included.
- [Blur Reveal](https://uibrik.com/components/blur-reveal.md): Letters sharpen out of a blur, one after another.
- [Domino Letters](https://uibrik.com/components/domino-letters.md) (Pro): Letters topple one into the next like dominoes.
- [Fade In Left to Right](https://uibrik.com/components/fade-left-to-right.md): A soft-edged mask reveals the text from left to right.
- [Falling Letters](https://uibrik.com/components/falling-letters.md): Letters drop in and settle with a small bounce.

## Ground rules

- Only the props above exist. To change anything else, edit the installed file.
- Keep the files in `components/uibrik/scroll-highlight/` so the import paths keep resolving.
- The playbook for working with the whole library: https://uibrik.com/llms.txt
