Hulian UIv0.93.5413 components0 components
  • Start
  • Components
  • Blocks
  • Pages
  • Demos
  • Changelog
ChineseEnglish
  • ComponentsComponents
  • ThemeTheme

Backgrounds

  • DotPattern
  • GridPattern
  • StripedPattern
  • Spotlight
  • FadeMask
  • RetroGrid
  • Ripple
  • Meteors
  • Aurora
  • Particles
  • FlickeringGrid
  • WavyBackground
  • Silk
  • Iridescence
  • Threads
  • Orb
  • LiquidChrome
  • Balatro
  • Ballpit
  • Beams
  • ColorBends
  • DarkVeil
  • Dither
  • DotField
  • EvilEye
  • FaultyTerminal
  • Ferrofluid
  • FloatingLines
  • Galaxy
  • GradientBlinds
  • Grainient
  • GridDistortion
  • GridMotion
  • GridScan
  • Hyperspeed
  • LetterGlitch
  • Lightfall
  • Lightning
  • LightPillar
  • LightRays
  • LineWaves
  • LiquidEther
  • PixelBlast
  • PixelSnow
  • Plasma
  • PlasmaWave
  • Prism
  • PrismaticBurst
  • Radar
  • RippleGrid
  • ShapeGrid
  • SideRays
  • SoftAurora

Overlay Effects

  • BorderBeam
  • ShineBorder
  • GlareHover
  • Lens
  • AnimatedBeam
  • OrbitingCircles
  • ProgressiveBlur
  • CardSpotlight
  • Reveal
  • Antigravity
  • BlobCursor
  • ClickSpark
  • Crosshair
  • ElectricBorder
  • GhostCursor
  • GradualBlur
  • ImageTrail
  • LaserFlow
  • MagicRings
  • Magnet
  • MagnetLines
  • MetaBalls
  • MetallicPaint
  • OrbitImages
  • PixelTrail
  • PixelTransition
  • Ribbons
  • ShapeBlur
  • SplashCursor
  • StarBorder
  • StickerPeel
  • TargetCursor
  • Cubes
  • Tilt
  • BorderGlow
  • GlassIcons
  • GlassSurface
  • Lanyard
  • ModelViewer
  • FluidGlass

Hyperspeed

hyperspeed

Creates a warp-speed tunnel of luminous streaks rushing from a vanishing point.

Usage

Basic usage

Put it into the relative black bottom container. The component comes with block h-full w-full. The size is controlled by the container.

tsx
<div className="relative h-64 overflow-hidden rounded-xl bg-black">
  <Hyperspeed className="absolute inset-0" />
</div>

Overlay title

The light strip layer is aria-hidden, and the copywriting is placed on the upper layer pointer-events-none in the center.

Hyperspeed
tsx
<div className="relative h-64 overflow-hidden rounded-xl bg-black">
  <Hyperspeed className="absolute inset-0" />
  <div className="pointer-events-none absolute inset-0 flex items-center justify-center text-sm font-medium text-white/80">
    Hyperspeed
  </div>
</div>

Full throttle (high-speed intensive)

speed increases the volume + density increases the density to create a sense of hyperspace jump acceleration.

tsx
<div className="relative h-64 overflow-hidden rounded-xl bg-black">
  <Hyperspeed speed={3} density={90} className="absolute inset-0" />
</div>

Straight tunnel (no twisting)

distortion=0 The road turbulence swings off, and the light band rushes straight towards it.

tsx
<div className="relative h-64 overflow-hidden rounded-xl bg-black">
  <Hyperspeed distortion={0} density={56} className="absolute inset-0" />
</div>

Customized car light color

leftColor / rightColor Pass any CSS color, overwriting the default chart token.

tsx
<div className="relative h-64 overflow-hidden rounded-xl bg-black">
  <Hyperspeed
    leftColor="oklch(0.72 0.2 40)"
    rightColor="oklch(0.7 0.16 200)"
    speed={1.5}
    className="absolute inset-0"
  />
</div>

When to Use

Use it when you need a strong impact warp tunnel/jump speed hero background. For purely geometric perspective grids (no motion tunnels) use RetroGrid; for low-key grid shading use GridPattern.

Import

ts
import { Hyperspeed } from "@hulianui/ui"

Props

NameTypeDefaultDescription
speednumber1The overall propulsion speed multiplier, the larger it is, the faster it will rush. It is recommended to be 0.2-4
densitynumber40The density of light strips on both sides of the road is larger and denser. It is recommended that 10-120
distortionnumber1Field of view distortion intensity (turbulence swing), 0=straight tunnel, recommended 0-2
fadenumber0.4Fog fade intensity, the greater the distance, the faster the distance will be engulfed by darkness, recommended 0-1
leftColorstringvar(--color-chart-4)Left (leaving) car light color, any CSS color
rightColorstringvar(--color-chart-2)Right (approaching) car light color, any CSS color
classNamestring-Root container (itself block h-full w-full, the size is controlled by the container)
styleCSSProperties-Forward the root container inline style

Slots

SlotTypeDescription
fallbackReactNodeContent rendered with the static fallback in reduced-motion or non-WebGL environments

Usage Guidelines

  • The glow is only visible on dark-colored containers, and is almost invisible on light-colored containers. It is recommended to use bg-black or dark-colored bases.
  • The single-shader OGL effect renders only on the client. SSR, unavailable WebGL, and reduced motion use the static fallback.
  • Fullscreen background layers in a non-cascading context parent of an opaque background may be obscured by the parent background, see [[webgl-canvas-rendered-but-invisible-negative-zindex-covered]].
  • leftColor/rightColor must use the --color- prefix token when passing CSS variables, see [[hulian-token-color-var-needs-color-prefix]].

Related

DotPattern · GridPattern · StripedPattern · Spotlight · RetroGrid · Ripple

Playground

<div className="relative h-64 overflow-hidden rounded-xl bg-black">
  <Hyperspeed
    speed={1}
    density={40}
    distortion={1}
    fade={0.4}
    className="absolute inset-0"
  />
</div>
PreviousGridScanDecorationNextLetterGlitch

On this page

  • Usage
  • Documentation
    • When to Use
    • Import
    • Props
    • Slots
    • Usage Guidelines
    • Related
  • Playground