Skip to content

NewMCP server for your coding agent. Set it up ›

Nexus UI
Get Pro

Warp Speed Card, animated React component

Wrap a phrase in a headline to give it a hyperdrive: hover, focus or tap it and a starfield inside its box spools up on a spring, stretching stars into streaks as speed builds. The phrase squashes and stretches on the kick and drops out of warp with a jolt when you let go.

  • Pro
  • Motion Effects
  • Hover
  • Spring

Play with it

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

Build amazing websites
at warp speed

Props

PropTypeDefaultWhat it does
WarpTextTrigger.children—The phrase that jumps to warp.
WarpTextTrigger.beamColor"255,255,255"Star colour as an "r,g,b" triplet.
WarpTextTrigger.onWarpChange—Called when the jump starts and when it drops out.
WarpTextTrigger.autoplayfalseMakes a jump every few seconds until someone hovers, focuses or taps the phrase.
WarpTextTrigger.className—Classes for the phrase box.
WarpSpeedCard.children—Card content, usually a heading containing a WarpTextTrigger.
WarpSpeedCard.className—Classes for the card.
WarpSpeedCard.contentClassName—Classes for the inner content wrapper.

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 with your API key

    Warp Speed Card is a Pro item, so the CLI has to send your API key. Do this once per project:

    1. Create a key at nexus-ui.com/dashboard/api-key. Copy it straight away: it starts with nxs_ and is shown only once.
    2. In your project root, next to package.json, create a file named .env.local with this line, using your own key:
      NEXUS_API_KEY=nxs_your_key_here
    3. Open components.json and add this entry inside the outermost braces, next to "aliases". Leave {name} and ${NEXUS_API_KEY} exactly as written; the CLI fills them in:
      "registries": {
        "@nexus-labs": {
          "url": "https://www.nexus-ui.com/api/registry/{name}",
          "headers": {
            "Authorization": "Bearer ${NEXUS_API_KEY}"
          }
        }
      }

About Warp Speed Card

The Warp Speed Card confines a warp-speed starfield effect to the bounding box of a text element on hover. Hovering the target phrase reveals a dark space scene with streaking light beams rendered entirely within the text bounds — the text itself stays static. The effect uses canvas rendering clipped to the text element's dimensions, with Framer Motion handling the entrance and exit transitions. A cinematic micro-interaction that rewards cursor exploration.

Good for

  • Feature callout text interactions
  • Hero subheading hover effects
  • Promotional copy emphasis
  • Interactive product description elements

Warp Speed Card questions

How do I use the warp speed effect?

Wrap a few words in `WarpTextTrigger` inside your heading. `WarpSpeedCard` is an optional card wrapper for the section.

Can I change the beam color?

Yes. Pass `beamColor` as an RGB triplet string, for example "255,255,255" for white.

Does it work on touch screens?

The effect is triggered by mouse hover only, so on touch screens and with keyboard focus the text stays in its normal style and remains readable.

How do I install it?

Run `npx shadcn@latest add @nexus-labs/warp-speed-card`. It comes with Pro and only depends on framer-motion.