# M text cursor proximity 1

> Scale — characters grow as cursor approaches with linear falloff

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

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

## Install

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

## Files

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

```tsx
"use client";
import { useRef } from "react";
import { TextCursorProximity } from "@/registry/default/motion/text-cursor-proximity";

export default function TextCursorProximityScale() {
  const containerRef = useRef<HTMLDivElement>(null);

  return (
    <div
      className="flex min-h-50 flex-col items-center justify-center gap-2 px-6 text-center"
      ref={containerRef}
    >
      <p className="text-muted-foreground text-sm">Hover to scale letters</p>
      <TextCursorProximity
        className="font-bold text-4xl tracking-tight"
        containerRef={containerRef}
        radius={60}
        styles={{ scale: { from: 1, to: 1.6 } }}
      >
        Move cursor here
      </TextCursorProximity>
    </div>
  );
}
```
