# M rotating text 1

> Hero inline — adjectives rotate inside a heading with stable width

A shadcn/ui block from the [@cnippet](https://ui.cnippet.dev/) registry, listed on [shadcn.exchange](https://shadcn.exchange/r/cnippet/m-rotating-text-1).

- Page, with a live preview: https://shadcn.exchange/r/cnippet/m-rotating-text-1
- Screenshot: https://abzjhwgwpdpz7ua5.public.blob.vercel-storage.com/shots/cnippet/m-rotating-text-1-light-04219ff21d4c8397.png
- Registry item: https://ui.cnippet.dev/r/m-rotating-text-1.json
- Categories: rotating text
- Listed: 2026-10-13, source last changed 2026-10-13

## Install

```bash
npx shadcn@latest add https://ui.cnippet.dev/r/m-rotating-text-1.json
```

Run it in a project that has shadcn/ui set up. It adds the files below and installs what they depend on.

## Dependencies

- Registry items: `@cnippet/rotating-text`

## Files

### `registry/default/motion-variants/m-rotating-text-1.tsx`

```tsx
"use client";

import { RotatingText } from "@/registry/default/motion/rotating-text";

const adjectives = [
  "beautiful",
  "accessible",
  "composable",
  "performant",
  "animated",
];

export default function RotatingTextHero() {
  return (
    <div className="flex min-h-50 items-center justify-center px-6">
      <h1 className="text-center font-bold text-4xl text-foreground tracking-tight sm:text-5xl">
        Build{" "}
        <RotatingText
          className="text-primary"
          direction="up"
          interval={2000}
          transition={{ damping: 20, stiffness: 160, type: "spring" }}
          words={adjectives}
        />{" "}
        interfaces
      </h1>
    </div>
  );
}
```
