Backgrounds

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.

Bring this into your project

Run this command in your project folder. The CLI adds the source and dependencies; then follow the usage example below.

npx webberui@latest add hyperspeed.en

New project or installation trouble? Start here →

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
Active edited usageDefault props
<Hyperspeed/>

The complete example includes the preview layout and data. Install the component first, then paste this file into your project.

Installation

npx webberui@latest add https://webberui.com/r/hyperspeed.en.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)
classNamestring—Forwarded 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