A mosaic of tiles that wipe away row by row, each row in the opposite direction of the one before, in a snaking order.
COLOR FIELD
Twelve painters on light and silence
npx shadcn@latest add https://hyperblur.dev/r/curtain-mixed.jsonWorks in any React project set up with the shadcn CLI. The file lands in components/hyperblur/curtain-mixed.tsx.
import { CurtainMixed } from "@/components/hyperblur/curtain-mixed"
<CurtainMixed rows={4} cols={7} trigger="view"><Cover /></CurtainMixed>| Prop | Type | Default | Description |
|---|---|---|---|
| children | ReactNode | built-in scene | Content revealed behind the curtain. |
| open | boolean | Controlled open state. True means the curtain is open and the content visible. Pair with onOpenChange. | |
| defaultOpen | boolean | false | Initial open state when uncontrolled. |
| onOpenChange | (open: boolean) => void | Called whenever the curtain opens or closes, including trigger, closeAfter and loop changes. | |
| trigger | "mount" | "view" | "manual" | "mount" | When the curtain opens by itself: after mount, when it scrolls into view, or never (drive it with open). |
| duration | number | 650 | Wipe time of each tile in milliseconds. |
| color | string | "#141416" | Base tile color. Tiles vary slightly around it. |
| accent | string | "#2f7bff" | Color mixed into a few tiles of the mosaic. |
| direction | "horizontal" | "vertical" | "horizontal" | Alternate wipe direction per row, or per column. |
| rows | number | 4 | Number of tile rows, from 1 to 16. |
| cols | number | 6 | Number of tile columns, from 1 to 16. |
| stagger | number | 45 | Delay between neighboring tiles in milliseconds. |
| replay | string | number | Change this value to snap the curtain shut and play the reveal again. | |
| closeAfter | number | Milliseconds to stay open before closing again. Leave unset to stay open. | |
| loop | boolean | false | Reopen after closing, for a continuous open, hold, close cycle. Use with closeAfter. |