A hard digital cut: slices of the new view tear in over the old one with jitter, skew and a split color fringe, while scan bars flash across. Over in about half a second.
Night Market
12.4k watching · 1080p
npx shadcn@latest add https://hyperblur.dev/r/transition-glitch-cut.jsonWorks in any React project set up with the shadcn CLI. The file lands in components/hyperblur/transition-glitch-cut.tsx.
import { TransitionGlitchCut } from "@/components/hyperblur/transition-glitch-cut"
<TransitionGlitchCut active={channel === 8} from={<ChannelSeven />} to={<ChannelEight />} />| 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 | 2400 | Milliseconds between switches when autoPlay is on. |
| duration | number | 560 | Cut time in milliseconds. |
| accent | string | "#ff2e63" | First fringe color and scan bar tint. |
| accentAlt | string | "#22d3ee" | Second fringe color. |