WebberUI

Hyperspeed

A hyperspace warp-travel tunnel animation, with star streaks jetting out from the vanishing point and leaving afterimage trails.

An interstellar jump simulated on canvas 2D: hundreds of star streaks accelerate outward from the vanishing point, paired with afterimage trails and lighter compositing to recreate the tunnel feel of hyperspace warp travel.

Loading preview…
npx shadcn@latest add https://webberui.com/r/hyperspeed.json

Playground

Tune the props live — the code snippet updates as you go, so you can dial in the look you want before copying it.

320
1
1
0.5
0.5
<Hyperspeed />

Installation

npx shadcn@latest add https://webberui.com/r/hyperspeed.json

Or, once registries are configured in components.json, install it as @webberui/hyperspeed.

Usage

import { Hyperspeed } from "@/components/ui/hyperspeed";

<Hyperspeed speed={1.2} starCount={340} className="h-[360px] w-full rounded-xl" />

The component does not give itself a height, so set explicit dimensions through className or a wrapping container (for example h-[360px]). Foreground content can be layered on top with absolute positioning.

Props

PropTypeDefaultDescription
starCountnumber320Number of stars — higher density is more spectacular and more expensive
speednumber1Warp intensity, roughly 0.2 for a slow cruise up to 3 for a full-speed jump
trailLengthnumber1Trail length multiplier — higher makes the streaks longer
colorsstring[]Cool-toned jump lightStar streak palette, distributed at random across the stars
backgroundstring"#05060f"Tunnel base color
originXnumber0.5Horizontal position of the vanishing point (0~1)
originYnumber0.5Vertical position of the vanishing point (0~1)
classNamestringForwarded to the outermost container

Accessibility

  • When the user has "reduce motion" enabled at the system level, one frozen frame of the warp is drawn and the animation then stops
  • The canvas is marked aria-hidden as a purely decorative layer, so it does not interfere with assistive technology announcing the foreground content

On this page