Venetian blind slats that tilt open one after another in 3D to reveal the content, and tilt shut in reverse order.
Midnight Ferry
Fri 8:40 pm · Screen 3 · 1 h 52 min
npx shadcn@latest add https://hyperblur.dev/r/curtain-blinds.jsonWorks in any React project set up with the shadcn CLI. The file lands in components/hyperblur/curtain-blinds.tsx.
import { CurtainBlinds } from "@/components/hyperblur/curtain-blinds"
<CurtainBlinds trigger="view" slats={10}><img src="/poster.jpg" alt="" /></CurtainBlinds>| 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 | 700 | Tilt time of each slat in milliseconds. |
| color | string | "#171717" | Slat color. |
| accent | string | "#2f7bff" | Color of the thin highlight along each slat edge. |
| direction | "horizontal" | "vertical" | "horizontal" | Horizontal slats tilt on the X axis, vertical slats on the Y axis. |
| slats | number | 8 | Number of slats, from 2 to 40. |
| stagger | number | 55 | Delay between consecutive slats 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. |