# Magnetic

A spring-follow wrapper — the surface leans toward the cursor and settles back.

- Family: Motion, imported from `mizu-ui` or `mizu-ui/motion`
- Docs: https://mizu.user64bit.world/components/magnetic
- Source: https://github.com/0xuser64bit/mizu/blob/main/packages/mizu/src/motion/Magnetic.tsx

## Usage

```tsx
import { Button, Magnetic } from "mizu-ui";

export function PullTab() {
  return (
    <Magnetic strength={0.4}>
      <Button>Pull</Button>
    </Magnetic>
  );
}
```

## Copy it with the shadcn CLI

```sh
npx shadcn@latest init 0xuser64bit/mizu/preset # once, where there is no components.json
npx shadcn@latest add 0xuser64bit/mizu/magnetic 0xuser64bit/mizu/button
```

## Props

- `strength`: `number` (default `0.32`). Fraction of the distance to the cursor that the element travels.

## Accessibility

Purely presentational — the wrapped control keeps its own keyboard and screen-reader behavior.

## Motion

Spring (stiffness 160, damping 14) on both axes. Travel is disabled by the reduced-motion hook.
