Skip to content

NewMCP server for your coding agent. Set it up ›

Nexus UI
Get Pro

Animated Select Headline, animated React component

A headline where one word sits inside a design-tool selection box, and every few seconds a different collaborator selects the next word. The box springs to the new width with an elastic overshoot, the size badge counts the pixels live, and the collaborator's cursor trails the corner on a softer spring.

  • Free
  • Motion Effects
  • Spring

Like Animated Select Headline? 256 more are in Pro.

Pro unlocks all 256 Pro components, every template and block, and everything we release next. Animated Select Headline stays free.

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
words["warp speed", "record time", "pure flow", "light speed"]Words or short phrases to cycle through.
prefix"Build amazing websites at"Text before the selected word.
suffix—Text after the selected word.
interval2500Milliseconds between words. 0 stops the cycling; click and arrow keys still step. Pauses while hovered or focused.
collaboratorsMaya, Leo, Ari, SamPeople whose cursors take turns selecting each word.
showCursortrueShows the collaborator's cursor and name tag.
showSizetrueShows the live width × height badge under the selection.
onChange—Called with the index of the newly selected word.
className—Classes for the wrapper.
headingClassName—Classes for the h2.

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/animated-select-headline
  2. 4

    Check what was added

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

    components/
    animated-select-headline/
    animated-select-headline.tsx
    index.ts
  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 { AnimatedSelectHeadline } from "@/components/animated-select-headline";
    
    export default function Page() {
      return (
        <main>
          <AnimatedSelectHeadline />
        </main>
      );
    }

Like Animated Select Headline? 256 more are in Pro.

Pro unlocks all 256 Pro components, every template and block, and everything we release next. Animated Select Headline stays free.

About Animated Select Headline

Animated Select Headline is a hero heading that cycles through keyword variants, blurring each word out as the next one fades in. The last two words carry a gradient so the rotating phrase reads as the emphasis. Built with Framer Motion, it suits multi-audience products that want one headline to speak to several use cases.

Good for

  • Multi-audience hero headlines
  • Product value proposition rotation
  • Feature benefit cycles
  • Landing page headline variants

Animated Select Headline questions

How do I change the rotating words?

Pass `words` as an array of strings, plus `prefix` and `suffix` for the fixed text around them.

How fast do the words change?

Set `interval` in milliseconds; the default is 2500.

Can I change the gradient colors?

The last two words use the gradients in the `ACCENT_GRADIENTS` array at the top of the file (cyan to emerald, amber to pink). Edit those Tailwind classes to change them.

Does it support dark mode?

The heading uses dark text by default. Pass `headingClassName="dark:text-white"`, as the demo does, to switch it in dark mode.