Backgrounds
Shooting Stars
Animated shooting stars effect with customizable colors, speed, and timing.
The ShootingStars component creates an animated shooting stars effect with customizable colors, speed, and timing. It's perfect for adding dynamic background animations to your UI.
Usage
Shooting Stars
Animated shooting stars with trails
<template>
<div class="relative h-64 w-full overflow-hidden rounded-lg border bg-gradient-to-br from-gray-900 to-black">
<MShootingStars />
<MStarsBackground />
<div class="relative z-10 h-full flex flex-col items-center justify-center text-center p-4">
<h3 class="text-2xl font-bold text-white mb-2">
Shooting Stars
</h3>
<p class="text-dimmed">
Animated shooting stars with trails
</p>
</div>
</div>
</template>
Examples
Basic Shooting Stars
Shooting Stars
Add magical shooting star effects to your interface for a whimsical and engaging user experience
<template>
<div class="relative h-96 w-full overflow-hidden rounded-xl border bg-gradient-to-br from-gray-900 to-black">
<MShootingStars />
<div class="relative z-10 h-full flex flex-col items-center justify-center text-center p-8">
<div class="mb-8">
<div class="w-20 h-20 rounded-full bg-gradient-to-r from-blue-400 to-cyan-400 flex items-center justify-center mx-auto">
<UIcon
name="i-lucide-star"
class="w-10 h-10 text-white"
/>
</div>
</div>
<h2 class="text-4xl font-bold text-white mb-6">
Shooting Stars
</h2>
<p class="text-dimmed max-w-md mb-8 text-lg">
Add magical shooting star effects to your interface for a whimsical and engaging user experience
</p>
<div class="flex flex-col sm:flex-row gap-4">
<UButton
color="primary"
variant="solid"
size="lg"
>
Create Magic
</UButton>
<UButton
color="neutral"
variant="outline"
size="lg"
>
View Demo
</UButton>
</div>
</div>
</div>
</template>
Customize
Customize
Min Speed10
Max Speed30
Min Delay1200
Max Delay4200
Star Color
Trail Color
Star Width10
Star Height1
Props
| Prop | Type | Default | Description |
|---|---|---|---|
minSpeed | number | 10 | Minimum speed of the shooting stars. |
maxSpeed | number | 30 | Maximum speed of the shooting stars. |
minDelay | number | 1200 | Minimum delay between shooting stars in milliseconds. |
maxDelay | number | 4200 | Maximum delay between shooting stars in milliseconds. |
starColor | string | '#9E00FF' | Color of the shooting star. |
trailColor | string | '#2EB9DF' | Color of the shooting star trail. |
starWidth | number | 10 | Width of the shooting star. |
starHeight | number | 1 | Height of the shooting star. |
class | string | '' | CSS classes to apply to the SVG container. |
UI
This component's theme exposes the slots below. Override any of them per instance with the ui prop, or app-wide under ui.shootingStars in app.config.ts.
| Prop | Type | Default | Description |
|---|---|---|---|
ui | object | - | Per-slot classes merged over the theme defaults. |
| Slot | Props | Description |
|---|---|---|
root | - | w-full h-full absolute inset-0 |