# Dross — Animated Card for React

> A pixel-dissolve card: on hover or click the surface divides into a grid of cells that dissolve away — each flashes white, shrinks and drifts up as a bright particle, with the odd seeded soft-white spark — then the second face condenses back from neutral smoke. Keyboard-operable, instant crossfade under reduced motion.

- Page: https://crucibleui.com/components/cards/dross
- Category: [cards](https://crucibleui.com/components/cards)
- Tier: pro (one-time purchase, see https://crucibleui.com/pricing)
- Engine: canvas

## Install

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

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

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

## Props (`DrossProps`)

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `front` | `React.ReactNode` | — | Content shown before the dissolve. |
| `back` | `React.ReactNode` | — | Content revealed after the dissolve. |
| `rows?` | `number` | `7` | Grid rows the card divides into. |
| `cols?` | `number` | `10` | Grid columns the card divides into. |
| `stepDuration?` | `number` | `8` | Stagger between cell ignitions in ms — the "step" of the wave. |
| `trigger?` | `"hover" \| "click"` | `"hover"` | What starts the dissolve. Hover also responds to keyboard focus. |
| `once?` | `boolean` | `false` | Stay on `back` after the first dissolve instead of reverting. |
| `colors?` | `DrossColors` | — | Palette overrides for the dissolve/smoke effects. |
| `heat?` | `number` | `1` | 0–1 master intensity: flash brightness, spark chance, smoke opacity. |
| `paused?` | `boolean` | — | Freeze the dissolve mid-frame. |
| `seed?` | `number` | `11` | Deterministic seed for cell order and spark placement. |

Also accepts: `Omit<React.ComponentPropsWithoutRef<"div">, "children" | "onClick">`.

## Usage example

```tsx
import { Dross } from "@/components/crucible/dross";

export default function DrossDemo() {
  return (
    <div className="relative isolate flex h-full min-h-[360px] w-full items-center justify-center overflow-hidden rounded-xl bg-neutral-950">
      <div
        aria-hidden
        className="pointer-events-none absolute inset-0 bg-[radial-gradient(ellipse_at_center,rgba(255,255,255,0.035),transparent_70%)]"
      />
      <div className="relative z-10 flex flex-col items-center gap-6">
        <Dross
          className="h-64 w-80"
          front={
            <div className="flex h-64 flex-col justify-between p-6">
              <span className="text-[11px] font-medium uppercase tracking-[0.2em] text-neutral-500">
                Front
              </span>
              <div>
                <h3 className="text-base font-semibold tracking-tight text-white">
                  Hover to dissolve
                </h3>
                <p className="mt-1 text-sm leading-relaxed text-white/60">
                  The surface breaks into cells that flash, lift, and fade away.
                </p>
              </div>
            </div>
          }
          back={
            <div className="flex h-full flex-col justify-between bg-gradient-to-br from-white/[0.07] via-transparent to-transparent p-6">
              <span className="text-[11px] font-medium uppercase tracking-[0.2em] text-neutral-400">
                Back
              </span>
              <div>
                <h3 className="text-base font-semibold tracking-tight text-white">
                  The second face
                </h3>
                <p className="mt-1 text-sm leading-relaxed text-white/60">
                  Move away and it reassembles, cell by cell, from soft smoke.
                </p>
              </div>
            </div>
          }
        />
        <p className="text-sm text-neutral-500">Hover the card to dissolve the face.</p>
      </div>
    </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.
