Tear Card
An image card whose edges fray and tear apart as the pointer moves, while the card drifts and tilts after it, then pulls itself back together.
pixikit.com/docs/components/tear-card
Customize
Width300px
Height400px
Intensity0.50
Sensitivity0.50
Hover decay0.05
Recovery0.6s
Idle0.35
Grain0.25
Detail5
Pattern4
Flow0.00
Chroma0.00
Travel50px
Tilt10°
Scope
Radius0px
Grayscale
Props
21| Name | Type | Default | Description |
|---|---|---|---|
image | string | None | Image URL. It fills the card like a cover. |
children | ReactNode | None | Content shown over the bottom of the image. |
width | number | 300 | Card width in pixels. |
height | number | 400 | Card height in pixels. |
intensity | number | 0.5 | How far the image tears apart at full decay, from 0 to 2. The edges tear the most so the photo stays readable. |
sensitivity | number | 0.5 | How little pointer movement it takes to reach full decay, from 0 to 1. |
hoverDecay | number | 0.05 | Decay that stays while the pointer rests on the card, from 0 to 1. |
recovery | number | 0.6 | Seconds the image takes to pull itself back together once the pointer slows down. |
idle | number | 0.35 | Keeps the edges slowly fraying and soft patches drifting while nobody interacts, from 0 to 1. |
grain | number | 0.25 | Size of the tears, from broad melting shapes at 0 to fine shards at 1. |
detail | number | 5 | Layers of noise in the tears, from 1 to 8. More layers give rougher edges. |
pattern | number | 4 | Picks a different tear pattern. |
flow | number | 0 | Lets the tears churn while the card is decaying. 0 keeps them still. |
chroma | number | 0 | Splits the color channels apart inside the tears. |
travel | number | 50 | How far in pixels the card drifts toward the pointer before it slows down. |
tilt | number | 10 | How far in degrees the card rotates as the pointer moves sideways. |
scope | "window" | "card" | "window" | Window follows the pointer anywhere on the page. Card only reacts while it is hovered. |
radius | number | 0 | Corner radius of the image in pixels. |
grayscale | boolean | false | Shows the image in grayscale. |
className | string | "" | Extra class names for the root. |
style | CSSProperties | None | Inline styles for the root. |