Time Tunnel
A tunnel lined with your videos that you fly through as you scroll, out through the light at the far end and onto your page. The view leans with the pointer, and the journey can follow a slider, a timeline or a scroller of your own instead of the page.
Included with membership
Members install Time Tunnel with one command and get the full source, the usage code and the Framer remix, licensed for client work. One membership covers the whole library and the CLI.
When to use it
The opening of a page with footage to show: a film, a travel story, a showreel, a launch. It takes over the first stretch of scrolling, so use one a page, at the top. Inside a box rather than the page, drive it with progress from a slider, a timeline or a scroller of your own.
- Use short, light loops, about 720 pixels wide at 2 to 4 Mbps. Every video decodes at once while the visitor flies.
- Use upright footage. Each screen is 3:4 and shows the middle of its video, so a wide shot loses its sides.
- Make the end of each loop run into its start, with a short crossfade for example, so the jump never shows on the walls.
- Give each video a label. The videos are hidden from screen readers, which read the labels as a list instead.
Avoid:
- Do not use 1080p or 4K files. On a laptop's built-in graphics the videos fall behind and play in steps.
- Do not serve the videos from another origin without CORS. The walls are drawn in WebGL, which cannot show a video it is not allowed to read, so those screens stay dark.
- Do not put it inside an element that scrolls without passing progress. On its own it follows the window's scroll, so it would never move.
Props
A tunnel lined with your videos. Scrolling flies the visitor down it, past screens on every side, towards a light at the far end and out onto the page. Your title sits over the tunnel's mouth, and the page they land on is waiting in the light.
<TimeTunnel />
The tunnel, its title screen and the page you land on. On its own it adds its length of scrolling to the page and flies as the window scrolls.
| Prop | Type | Default | Description |
|---|---|---|---|
videos | (string | TimeTunnelVideo)[] | — | The videos the tunnel is lined with, up to six. Every screen is upright, 3:4, and each video is cropped from its middle to fit, so vertical footage suits it best. Keep them light, about 720 pixels wide at 2–4 Mbps: every one decodes at once while you fly, and at 1080p a laptop's built-in graphics falls behind and the videos stall. |
panels | number | 8 | Screens around the circle. |
children | React.ReactNode | — | Your page, around the tunnel. The first child is the title screen. It sits over the tunnel's mouth with nothing behind it, so the tunnel shows through, and it grows and fades as you fly in. It is centred in one screen; give it a height of 100% to lay out the whole screen yourself. Everything after it is the page you land on, on the exit colour. It is in place the moment you come out of the light, with no scrolling to reach it, and carries on for as long as it is. |
length | number | 500 | How long the journey is, as a percentage of the screen's height: 500 is five screens of scrolling. |
progress | number | — | Where the journey is, 0 to 1, when you drive it yourself: from a slider, a timeline or your own scroller. The tunnel then fills its box, so give that a height, and adds no scrolling of its own. Leave it out to fly by scrolling the page. |
color | string | "#3cc8ff" | The light round the far opening. |
exitColor | string | "#eef6ff" | The light at the far end, and the page you arrive on. |
background | string | "#010309" | The dark between the screens. |
twist | number | 0, rows lined up | How far each row of screens turns from the last, in screens. |
onProgress | (progress: number) => void | — | Progress through the tunnel, 0 to 1, whenever it changes. |
className | string | — | Class for the outer element. |
<TimeTunnelVideo />
typeA video for the walls, when you want to give it a label. A plain URL works too.
| Prop | Type | Default | Description |
|---|---|---|---|
src* | string | — | Video URL. A different origin must allow CORS, since it is drawn into WebGL. |
label | string | — | Read by screen readers. |