Meteors

A meteor shower with a consistent travel angle and container-relative spawn positions.

meteors

Installation

pnpm dlx shadcn-svelte@latest add https://sv-animations.vercel.app/r/meteors.json

Usage

<script lang="ts">	import { Meteors } from "#lib/components/magic/meteors/index.js";</script>
<div class="relative h-64 overflow-hidden">	<Meteors /></div>

Props

Meteors

NameTypeDefaultDescription
numbernumber20Number of meteors
minDelaynumber0.2Minimum delay in seconds before meteor animation starts
maxDelaynumber1.2Maximum delay in seconds before meteor animation starts
minDurationnumber2Minimum duration in seconds for meteor animation
maxDurationnumber10Maximum duration in seconds for meteor animation
anglenumber215Angle in degrees for meteor trajectory
classClassValueAdditional CSS classes for the meteors container