# M letter 3d swap 3

> Direction showcase — four rows compare top, right, bottom, and left rotations

A shadcn/ui block from the [@cnippet](https://ui.cnippet.dev/) registry, listed on [shadcn.exchange](https://shadcn.exchange/r/cnippet/m-letter-3d-swap-3).

- Page, with a live preview: https://shadcn.exchange/r/cnippet/m-letter-3d-swap-3
- Screenshot: https://abzjhwgwpdpz7ua5.public.blob.vercel-storage.com/shots/cnippet/m-letter-3d-swap-3-light-052384c96daa4e90.png
- Registry item: https://ui.cnippet.dev/r/m-letter-3d-swap-3.json
- Categories: letter 3d swap
- Listed: 2026-10-13, source last changed 2026-10-13

## Install

```bash
npx shadcn@latest add https://ui.cnippet.dev/r/m-letter-3d-swap-3.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/letter-3d-swap`

## Files

### `registry/default/motion-variants/m-letter-3d-swap-3.tsx`

```tsx
"use client";

import { Letter3DSwap } from "@/registry/default/motion/letter-3d-swap";

const directions = ["top", "right", "bottom", "left"] as const;

export default function Letter3DSwapDirections() {
  return (
    <div className="flex min-h-50 flex-col items-center justify-center gap-6 px-6">
      <p className="text-muted-foreground text-xs">Hover each row</p>
      <div className="space-y-3">
        {directions.map((dir) => (
          <div className="flex items-center gap-3" key={dir}>
            <span className="w-14 text-right text-muted-foreground text-xs">
              {dir}
            </span>
            <Letter3DSwap
              frontFaceClassName="text-foreground"
              mainClassName="text-2xl font-bold"
              rotateDirection={dir}
              secondFaceClassName="text-primary"
              staggerDuration={0.04}
              transition={{ damping: 26, stiffness: 300, type: "spring" }}
            >
              CNIPPET
            </Letter3DSwap>
          </div>
        ))}
      </div>
    </div>
  );
}
```
