uibrik

Scroll to Highlight

Preview

Customize

Scroll1.6s
Dim0.20
Text size48px

Usage

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

<ScrollHighlight play={play} />

Installation

npx shadcn@latest add https://uibrik.com/r/scroll-highlight.json
Adds the files to components/uibrik/scroll-highlight and installs motion. With the @uibrik namespace set up: npx shadcn@latest add @uibrik/scroll-highlight.

Props

ScrollHighlight
text
Type string
"Scroll slowly. Each word waits in the dark until you reach it, then steps into the light."
The copy to animate.
scrollDuration
Type number
1.6
Replay scroll-through time.
dim
Type number
0.2
Opacity of words not yet reached.
playrequired
Type number
–
Each change plays the effect again; 0 shows its resting state.