Stars Travel
A motion-driven SVG background with an animated 'infinite travel' effect.
Installation
bunx --bun shadcn@latest add "https://www.kushaj.in/r/stars-travel.json"
Usage
import { StarsTravel } from "@/components/stars-travel";<StarsTravel>
<div className="relative z-10 flex h-full items-center justify-center text-white">
Your content goes here
</div>
</StarsTravel>Examples
Custom Animation Speed
Adjust the duration to make the travel effect faster or slower.
API Reference
| Prop | Type | Default | Description |
|---|---|---|---|
children | ReactNode | - | Content layered over the animated stars-travel. |
className | string | - | Classes for the stars-travel container. |
svgOptions | object | {} | Animated stars-travel settings. |
svgOptions.duration | number | 2 | Loop duration in seconds. |