# Plumbline — Animated Card for React

> A physics ID badge on a lanyard: a verlet-simulated strap hangs from above, the charcoal card sways with gravity and an ambient breeze, and you can grab, drag, and fling it — it swings and settles with real momentum. Hand-rolled rope physics, offscreen-paused, reduced-motion-safe; a ghost hand flicks it now and then when untouched.

- Page: https://crucibleui.com/components/cards/plumbline
- Category: [cards](https://crucibleui.com/components/cards)
- Tier: pro (one-time purchase, see https://crucibleui.com/pricing)
- Engine: r3f
- npm dependencies: three, @react-three/fiber

## Install

```bash
npx shadcn@latest add @crucible/plumbline
```

Pro install requires adding the token-bearing `@crucible` registry to components.json (issued at https://crucibleui.com/account after purchase).

Import from `@/components/crucible/plumbline`.

## Props (`Props`)

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `name?` | `string` | `"Avery Quinn"` | Name printed on the badge face. |
| `role?` | `string` | `"Staff Engineer"` | Role/subtitle printed under the name. |
| `cardColor?` | `string` | — | Card slab color (hex). Matte charcoal by default. |
| `strapColor?` | `string` | — | Lanyard strap color (hex). The strap is the composition's single accent — deep crimson by default. |
| `gravity?` | `number` | `1` | Gravity multiplier. 1 = natural badge weight, lower floats dreamily. |
| `sway?` | `number` | `1` | Idle sway intensity (0 disables the ambient breeze). |
| `interactive?` | `boolean` | `true` | Enable grab-and-fling dragging (and Left/Right-arrow swings when focused). |
| `paused?` | `boolean` | `false` | Freeze the badge at its rest pose. Also forced visually static when the user prefers reduced motion (drag stays available but critically damped). |
| `className?` | `string` | — | Extra classes for the wrapper (fills its container: `relative h-full w-full`). |
| `idle?` | `boolean` | `true` | Idle autoplay: after 1.5s with no pointer over the stage, a ghost hand gives the badge an occasional gentle seeded flick (every ~4–7s) on top of the breeze, so it keeps swinging in thumbnails and heroes. Any real pointer suppresses it instantly. Off under reduced motion / `paused`. |
| `ref?` | `React.Ref<PlumblineHandle>` | — | Imperative handle — see {@link PlumblineHandle}. |

## Usage example

```tsx
import { Plumbline } from "@/components/crucible/plumbline";

export default function PlumblineDemo() {
  return (
    <div className="relative isolate flex h-full min-h-[420px] w-full items-center justify-center overflow-hidden rounded-xl bg-neutral-950">
      <Plumbline className="absolute inset-0" />
      <p className="pointer-events-none absolute bottom-4 z-10 text-sm text-neutral-500">
        Drag the badge.
      </p>
    </div>
  );
}
```

## Accessibility & performance

Honors `prefers-reduced-motion` with a designed static frame or fade (never a blank box) and passes `className` through. Pauses offscreen and on hidden tabs, clamps device pixel ratio, and tears down its GL/canvas context on unmount.
