import { HyperspaceBackground } from "@/components/ui/hyperspace-background"
export function HyperspaceBackgroundDemo() {
return (
<div className="relative flex h-[400px] w-full items-center justify-center overflow-hidden rounded-lg bg-black">
<HyperspaceBackground />
<h1 className="font-gilroy relative z-10 bg-gradient-to-br from-white to-zinc-400 bg-clip-text px-2 text-center text-4xl font-semibold text-transparent mix-blend-difference">
Ship at the <br />
speed of light
</h1>
</div>
)
}
pnpm dlx shadcn@latest add https://badtz-ui.com/r/hyperspace-background.json
import { HyperspaceBackground } from "@/components/ui/hyperspace-background";
<div className="w-full relative h-[350px]">
<HyperspaceBackground />
</div>
HyperspaceBackground
props.
Prop | Type | Default |
---|---|---|
starTrailOpacity? | number | 0.5 |
starSpeed? | number | 1.01 |
starColor? | string | "#FFFFFF" |
starSize? | number | 0.5 |
className? | string | - |
This component is heavily inspired by @ybensira
On This Page