Preview live, install via shadcn or copy the source.
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
| src | string | — | Yes | Image source URL. |
| alt | string | — | No | Alt text for the image. |
| direction | "tr-bl" | "tl-br" | "br-tl" | "bl-tr" | tr-bl | No | Diagonal sweep direction. tr-bl = top-right to bottom-left (default). |
| start | string | top 60% | No | ScrollTrigger start position (element enters viewport at ~60%). |
| end | string | top 30% | No | ScrollTrigger end position (animation completes at ~30%). |
| scrub | boolean | number | 1 | No | Scrub smoothing. Number is lag, true = 1, false disables. |
| scroller | string | HTMLElement | null | — | No | Custom ScrollTrigger scroller (selector or element). Needed inside fixed overflow containers. |
| showCoordinates | boolean | true | No | Show X/Y coordinate labels on the axes. |
| coordinateMode | "px" | "percentage" | "both" | px | No | How coordinates are formatted – px, %, or both. |
| lineColor | string | white | No | Crosshair line color. |
| lineWidth | number | 1 | No | Line width in px. |
| dotColor | string | — | No | Center dot color (defaults to lineColor). |
| dotSize | number | 6 | No | Center dot diameter in px. |
| gap | number | 8 | No | Gap around dot where lines break (px). |
| showBrackets | boolean | true | No | Show corner brackets. |
| bracketSize | number | 18 | No | Bracket size in px. |
| bracketColor | string | — | No | Bracket color (defaults to lineColor). |
| bracketWidth | number | 1.5 | No | Bracket stroke width. |
| reveal | "clip" | "none" | clip | No | Reveal mode – clip grows a rect from start corner to crosshair. |
| initialScale | number | 1.08 | No | Initial image scale before reveal (zoom-out effect). |
| disableBlur | boolean | false | No | Disable blur fade during reveal. |
| imageClassName | string | — | No | Extra class for the img element. |
| labelClassName | string | — | No | Class for coordinate labels. |
| onProgress | (progress: number) => void | — | No | Callback with scrub progress 0-1. |