Components
Warp Tunnel
A tunnel of light rushing past.
ProPro, coming soon.
Ship at light speed
<WarpTunnel>
<Hero />
</WarpTunnel>Get notified
Warp Tunnel is a Pro effect. Join the waitlist and we'll email you when it's available.
Usage
Stars rush out of a vanishing point at the centre, stretching into streaks as they pass. It draws on a canvas, and the drawing stops while it's off-screen or the tab is hidden. Without canvas support, your content shows on its own.
import { WarpTunnel } from "@zjkm/pro/warp-tunnel";
export function Hero() {
return (
<WarpTunnel className="rounded-2xl bg-black p-16">
<h1 className="text-white">Ship at light speed</h1>
</WarpTunnel>
);
}Props
| Prop | Type | Default | Description |
|---|---|---|---|
children | ReactNode | Content shown over the tunnel. | |
color | string | "#ffffff" | Star colour. |
count | number | 400 | Number of stars. |
speed | number | 1 | Travel speed. |
className | string | Classes for the wrapper. |
With reduced motion, the stars stay still as points.