The view is cut into flaps hinged at the middle, like a station board. Each column drops its top half in turn, left to right, and settles with a small bounce.
npx shadcn@latest add https://hyperblur.dev/r/transition-split-flap.jsonWorks in any React project set up with the shadcn CLI. The file lands in components/hyperblur/transition-split-flap.tsx.
import { TransitionSplitFlap } from "@/components/hyperblur/transition-split-flap"
<TransitionSplitFlap active={page === 2} columns={5} from={<BoardOne />} to={<BoardTwo />} />| Prop | Type | Default | Description |
|---|---|---|---|
| from | ReactNode | built-in scene | The first view, shown while active is false. You can also pass two children instead of from and to. |
| to | ReactNode | built-in scene | The second view, shown while active is true. |
| active | boolean | Controlled state. False shows from, true shows to. Pair with onActiveChange. | |
| defaultActive | boolean | false | Initial state when uncontrolled. |
| onActiveChange | (active: boolean) => void | Called whenever the view switches, including switches made by autoPlay. | |
| autoPlay | boolean | false | Switch back and forth by itself. Stops when the user prefers reduced motion. |
| interval | number | 2800 | Milliseconds between switches when autoPlay is on. |
| duration | number | 620 | Fall time of one flap in milliseconds. |
| stagger | number | 90 | Delay between columns in milliseconds. |
| columns | number | 4 | Number of flaps across. |