A QR code that builds itself out of a toy. A scrambled glossy cube with black and white stickers spins in raw WebGL; on touch, click or after a short autoplay its layers click back into place with elastic snaps, the cube breaks apart and every black module flies in, tumbling, to rebuild a flat, high-contrast code on a white card with the correct quiet zone. A second variant, a pixel-art voxel tree, can be pulled or tapped so its leaves drop, bounce on the floor and then rearrange into the same code. The QR encoder is built in: byte mode, Reed-Solomon error correction, automatic mask selection, levels L, M, Q and H, versions 1 to 10. A Replay button rewinds the whole sequence. Reduced motion shows the finished code and an SVG code stands in without WebGL.
Included in Pro and aboveCompare plans
Live preview. Move the mouse, scroll and click inside the frame.
import { QrCubeReveal } from "@/components/hyperblur-pro/qr-cube-reveal"
<QrCubeReveal
value="https://example.com/menu"
variant="cube"
level="Q"
accent="#2f6bff"
/>| Prop | Type | Default | Description |
|---|---|---|---|
| value | string | "https://hyperblur.com" | Text or URL encoded in the QR code. Up to about 270 bytes at level L. |
| variant | "cube" | "tree" | "cube" | cube solves a scrambled puzzle cube before it breaks apart. tree is a pixel-art tree you pull or tap so the leaves fall and rearrange. |
| level | "L" | "M" | "Q" | "H" | "M" | Error correction level of the QR code. |
| dark | string | "#0b0d12" | Color of the QR modules. Keep it dark for reliable scanning. |
| light | string | "#ffffff" | Color of the card and quiet zone behind the code. Keep it light. |
| accent | string | "#2f6bff" | Accent for the status dot, the focus ring and one face of the cube. |
| treeColors | [string, string, string] | ["#2f7d32", "#7ccf55", "#6b4a2b"] | Dark leaf, light leaf and trunk colors of the tree variant. |
| eyebrow | string | "Cube to QR" | Small pill above the headline. |
| title | string | "Solve the cube. Scan the code." | Main headline. The tree variant has its own default. |
| subtitle | string | "A scrambled cube clicks itself into place..." | Supporting paragraph. |
| autoplay | boolean | true | Starts the sequence on its own shortly after mounting. Touch or click also starts it. |
| replayLabel | string | "Replay" | Label of the button shown once the code is ready. |
| onRevealed | () => void | undefined | Called when the finished code is on screen. |
| maxDpr | number | 2 | Upper limit for the canvas pixel ratio (capped at 2). |
Source code is included in Pro and above