Skip to content
synccn

Text Reveal

New

Words brighten as you scroll through a paragraph, in the page or any scroll container, or once on view.

Scroll down ↓

Components you copy into your project and own. Read every line, change anything, and keep it in step with updates when you want them.

Installation

$ pnpm dlx shadcn@latest add @synccn/text-reveal

First time in this project? Connect synccn with one command.

Usage

import { TextReveal } from "@/components/ui/text-reveal";<TextReveal text="Components you own." />

API reference

Generated from the component's TypeScript types, so it always matches the code.

TextReveal

Paragraph whose words brighten as you scroll through it (or once, when it comes into view). Works in the page or inside any scrolling container. Static with reduced motion.

  • textrequired
    string

    The text. Words light up one after another.

  • trigger
    "scroll" | "view"

    Default "scroll"

    "scroll" ties the reveal to scrolling; "view" plays it once when the text comes into view.

  • duration
    number

    Default 1.6

    Seconds for the whole reveal, with trigger "view".

  • className
    string

    Extra classes for the root element.

Dependencies

Read from the component's imports when the site builds. The CLI installs all of these for you.

Helpers

npm packages

Accessibility

  • Screen readers get the full sentence at once; reduced motion shows it fully lit.

From the source

Read from this component's code when the site builds, so it can't drift.

  • Respects the reduced motion setting
  • Includes text only screen readers hear