Skip to content

NewMCP server for your coding agent. Set it up ›

Nexus UI
Get Pro

Text Reveal Card, animated React component

A card where you scrub a divider across one sentence to swap it for another. The divider follows the pointer on a spring, leans into the direction you move and swings upright when you stop, sheds sparks from the seam, and bounces home when you leave.

  • Free
  • Cards
  • Hover
  • Spring

Like Text Reveal Card? 256 more are in Pro.

Pro unlocks all 256 Pro components, every template and block, and everything we release next. Text Reveal Card stays free.

Play with it

Move the controls and watch it change. Copy code gives you a snippet with only the props you changed.

Launch review

Most teams ship on a hunch.

Drag across the line, or use the arrow keys.

Props

PropTypeDefaultWhat it does
text"Most teams ship on a hunch."The sentence you see before scrubbing.
revealContent"Yours will ship on proof."What the scrub reveals. A string gets the blue-to-purple gradient.
title—Small heading above the reveal area.
description"Drag across the line, or use the arrow keys."One-line hint under the reveal area.
icon—Icon next to the title.
image—Optional image URL above the card body. Nothing is fetched unless you pass one.
children—Extra content at the bottom of the card.
intensity1Spark amount, 0.5 to 2.2.
className—Classes for the card.
revealClassName—Classes for the reveal area.
disabledfalseShows the revealed sentence and turns the interaction off.
autoplayfalseSweeps the divider across and back every few seconds until someone touches the card.

Add it to your project

  1. 1

    Set up your project once

    You need a Next.js project with Tailwind CSS and the @/ import alias. In its root folder, run this once. It creates components.json and the cn() helper in src/lib/utils.ts:

    npx shadcn@latest init -d

    Starting from nothing? The Quick Start walks through the whole thing.

  2. 2

    Connect the registry

    Run this once per project. It writes the Nexus UI entry into components.json for you:

    npx shadcn@latest registry add "@nexus-labs=https://www.nexus-ui.com/api/registry/{name}"

    Type it exactly as shown. {name} is filled in by the CLI with the component you ask for, so you never replace it.

  1. 3

    Add the component

    Run this from your project root. It adds the component, the helpers it imports and its npm packages.

    npx shadcn@latest add @nexus-labs/text-reveal-card
  2. 4

    Check what was added

    With a project made as in the Quick Start (a src/ folder), these files land in it:

    components/
    text-reveal-card/
    index.ts
    text-reveal-card.tsx
  3. 5

    Copying by hand? Skip the registry

    Instead of steps 2 and 3 you can copy the files yourself, with no registry and no API key. Step 1 still applies, so that cn() exists. Install the packages:

    npm install framer-motion

    Then show the source and create each file at the path it gives:

  4. 6

    Use it in a page

    Installing only adds the files. Import the component in a page and render it. The Usage tab on the preview shows a fuller example with props:

    // src/app/page.tsx
    import { TextRevealCard } from "@/components/text-reveal-card";
    
    export default function Page() {
      return (
        <main>
          <TextRevealCard />
        </main>
      );
    }

Like Text Reveal Card? 256 more are in Pro.

Pro unlocks all 256 Pro components, every template and block, and everything we release next. Text Reveal Card stays free.

About Text Reveal Card

The Text Reveal Card hides secondary text beneath a masked overlay that reveals on hover using CSS clip-path animation driven by cursor position. Moving the cursor across the card shifts the clip boundary, uncovering hidden content progressively. Spring physics smooth the mask transition for a fluid feel. Use it for feature cards that tease additional context, before/after reveals, and testimonial cards where the full quote is revealed on interaction.

Good for

  • Feature reveal and detail cards
  • Testimonial card reveals
  • Before/after content displays
  • Product description hover effects

Text Reveal Card questions

How do I set the visible and hidden text?

`title` and `description` are the visible text, and `revealContent` is what appears on hover. You can also pass an `icon`, an `image` or `children`.

Does the reveal work on phones?

Yes. On touch devices a tap toggles the hidden text, and on desktop keyboard focus reveals it in full.

What happens with reduced motion?

The particle edge and cursor wipe are turned off and the hidden text simply fades in.

How do I install it?

Run `npx shadcn@latest add @nexus-labs/text-reveal-card`. Use `intensity` (0.5 to 2.2) to size the glow and `disabled` to turn the effect off.