# M text loop 2

> Animated status badge — rich content items in a pill with slide transition

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

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

## Install

```bash
npx shadcn@latest add https://ui.cnippet.dev/r/m-text-loop-2.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/text-loop`

## Files

### `registry/default/motion-variants/m-text-loop-2.tsx`

```tsx
import { TextLoop } from "@/registry/default/motion/text-loop";

const statuses = [
  { color: "bg-emerald-500", label: "All systems operational" },
  { color: "bg-blue-500", label: "Deploying v2.4.1" },
  { color: "bg-amber-500", label: "Elevated latency" },
];

export default function TextLoopStatus() {
  return (
    <div className="flex min-h-50 items-center justify-center px-6">
      <div className="flex items-center gap-2 rounded-full border border-border bg-card px-4 py-2 shadow-sm">
        <TextLoop
          interval={3}
          transition={{ duration: 0.35 }}
          variants={{
            animate: { opacity: 1, y: 0 },
            exit: { opacity: 0, y: -8 },
            initial: { opacity: 0, y: 8 },
          }}
        >
          {statuses.map(({ color, label }) => (
            <span className="flex items-center gap-2" key={label}>
              <span className={`h-2 w-2 rounded-full ${color}`} />
              <span className="font-medium text-foreground text-sm">
                {label}
              </span>
            </span>
          ))}
        </TextLoop>
      </div>
    </div>
  );
}
```
